Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run dev启动报错 #2326

Closed
nyanboard opened this issue Jul 4, 2019 · 6 comments
Closed

npm run dev启动报错 #2326

nyanboard opened this issue Jul 4, 2019 · 6 comments

Comments

@nyanboard
Copy link

npm run dev出现以下问题
Module build failed (from ./node_modules/eslint-loader/index.js):
Error: Cannot find module 'E:\work\vue-element-admin\node_modules\eslint\lib\api
.js/package.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.module.exports (E:\work\vue-element-admin\node_modules\eslint-load
er\index.js:170:23)

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

@umlingo
Copy link

umlingo commented Jul 4, 2019

》环境:
/mac 10.14.5 /vue-element-admin-v4.2.1
》我已经找到发生问题的地方,就在“eslint-loader/index.js 163-170”代码块内重新引用了“webpack.query”中定义的“EslintPath”
》现在我使用以下临时解决方案可以避免此问题出现,但也希望官方给出解决方案!!!

// vue.config.js > chainWebpack(config) 函数内增加如下配置:
config.module
.rule('eslint')
.use('eslint-loader')
.loader('eslint-loader')
.tap(options => {
options.eslintPath = resolve('/node_modules/eslint');
return options
})
.end()

@Mr-ShiHuaYu
Copy link

我也是这个问题,在我取消了 ESLint 校验,在文档中,
如果你不想使用 ESLint 校验(不推荐取消),只要找到 vue.config.js 文件。
进行如下设置:
将原来的lintOnSave: process.env.NODE_ENV === 'development'改为 lintOnSave: false 即可

@banshow
Copy link

banshow commented Jul 4, 2019

package.json中@vue/cli-plugin-eslint版本改为"^3.9.1"

@Mr-ShiHuaYu
Copy link

package.json中@vue/cli-plugin-eslint版本改为"^3.9.1"

试过了,可以,谢谢

@PanJiaChen
Copy link
Owner

Fixed in #2327

@jozhi
Copy link

jozhi commented Dec 15, 2020

package.json
"rules": { "generator-star-spacing": "off", "no-tabs": "off", "no-unused-vars": "off", "no-console": "off", "no-irregular-whitespace": "off", "no-debugger": "off" } }
.eslintrc.js
rules: { "no-unused-vars": 'warn' }

bingo!

EdwinBetanc0urt pushed a commit to EdwinBetanc0urt/adempiere-vue that referenced this issue Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants