[英]npm run dev function gives me error in my ubuntu os
When i run npm run dev
function it gives me this, just before a day ago it was working correctly, can anyone please help me why i am getting this error ? 当我运行npm run dev
function时,它给了我这个,就在一天前它可以正常工作之前,有人可以帮助我为什么我得到这个错误吗? this is my full error response, can anyone please look at this response, and help me what's exact issue in it ? 这是我的完整错误响应,任何人都可以看看这个响应,并帮助我解决其中的确切问题吗? any help will be really appreciated, i spent lots of hours to resolve this issue but didn't help me, 任何帮助将不胜感激,我花了很多时间解决此问题,但没有帮助我,
> mern-auth@1.0.0 dev /var/www/mern-plaid
> concurrently "npm run server" "npm run client"
[0]
[0] > mern-auth@1.0.0 server /var/www/mern-plaid
[0] > nodemon server.js
[0]
[1]
[1] > mern-auth@1.0.0 client /var/www/mern-plaid
[1] > npm start --prefix client
[1]
[0] [nodemon] 1.19.1
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching: *.*
[0] [nodemon] starting `node server.js`
[1]
[1] > client@0.1.0 start /var/www/mern-plaid/client
[1] > react-scripts start
[1]
[1]
[1] There might be a problem with the project dependency tree.
[1] It is likely not a bug in Create React App, but something you need to fix locally.
[1]
[1] The react-scripts package provided by Create React App requires a dependency:
[1]
[1] "babel-eslint": "9.0.0"
[1]
[1] Don't try to install it manually: your package manager does it automatically.
[1] However, a different version of babel-eslint was detected higher up in the tree:
[1]
[1] /var/www/mern-plaid/client/node_modules/babel-eslint (version: 10.0.3)
[1]
[1] Manually installing incompatible versions is known to cause hard-to-debug issues.
[1]
[1] If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
[1] That will permanently disable this message but you might encounter other issues.
[1]
[1] To fix the dependency tree, try following the steps below in the exact order:
[1]
[1] 1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
[1] 2. Delete node_modules in your project folder.
[1] 3. Remove "babel-eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
[1] 4. Run npm install or yarn, depending on the package manager you use.
[1]
[1] In most cases, this should be enough to fix the problem.
[1] If this has not helped, there are a few other things you can try:
[1]
[1] 5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
[1] This may help because npm has known issues with package hoisting which may get resolved in future versions.
[1]
[1] 6. Check if /var/www/mern-plaid/client/node_modules/babel-eslint is outside your project directory.
[1] For example, you might have accidentally installed something in your home folder.
[1]
[1] 7. Try running npm ls babel-eslint in your project folder.
[1] This will tell you which other package (apart from the expected react-scripts) installed babel-eslint.
[1]
[1] If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
[1] That would permanently disable this preflight check in case you want to proceed anyway.
[1]
[1] P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!
[1]
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! client@0.1.0 start: `react-scripts start`
[1] npm ERR! Exit status 1
npm ERR!
[1] npm ERR! Failed at the client@0.1.0 start script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[0] Server up and running on port 5000 !
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! /root/.npm/_logs/2019-08-26T10_33_27_229Z-debug.log
[1] npm ERR! code ELIFECYCLE
npm ERR! errno 1
[1] npm ERR! mern-auth@1.0.0 client: `npm start --prefix client`
[1] npm ERR! Exit status 1
npm ERR!
[1] npm ERR! Failed at the mern-auth@1.0.0 client script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! /root/.npm/_logs/2019-08-26T10_33_27_278Z-debug.log
[1] npm run client exited with code 1
[0] MongoDB successfully connected
package.json package.json
{
"name": "mern-auth",
"version": "1.0.0",
"description": "Mern Auth Example",
"main": "server.js",
"scripts": {
"client-install": "npm install --prefix client",
"start": "node server.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\""
},
"author": "",
"license": "MIT",
"dependencies": {
"babel-eslint": "^10.0.3",
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.3",
"concurrently": "^4.0.1",
"express": "^4.16.4",
"is-empty": "^1.2.0",
"jsonwebtoken": "^8.3.0",
"moment": "^2.24.0",
"mongoose": "^5.3.11",
"nodemon": "^1.19.1",
"passport": "^0.4.0",
"passport-jwt": "^4.0.0",
"plaid": "^4.2.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-scripts": "^3.1.1",
"validator": "^10.9.0"
}
}
In npm if you know the exact version of the package needed, y, you can append it to the package name after the @ character. 在npm中,如果知道所需软件包的确切版本y,则可以将其附加到软件包名称后的@字符之后。
In your case react needs the version of 9.0.0 so, you need to uninstall your babel-eslint v. 10.0.3 and install v. 9.0.0. 在您的情况下,react需要9.0.0的版本,因此,您需要卸载babel-eslint 10.0.3版并安装9.0.0版。
npm uninstall babel-eslint --save
npm install --save babel-eslint@9.0.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.