I am trying to start the development server on a React project that I have not worked on for a long time. Upon running npm install
and npm start
I received the title error message.
I tried manually updating and then downgrading the Node-sass but I am still getting the same error no matter what I do.
Here is the full error message I am getting.
Failed to compile.
./src/App.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/App.scss)
Error: Node Sass version 5.0.0 is incompatible with ^4.0.0.
/home/dylan/Desktop/Werk/Professional stuff/SkylimitHost/node_modules/react-scripts/scripts/start.js:19
throw err;
^
[Error: ENOENT: no such file or directory, stat '/home/dylan/.steampath'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/home/dylan/.steampath'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cleanapp@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cleanapp@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dylan/.npm/_logs/2020-11-23T05_19_03_778Z-debug.log
And here is the complete log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/dylan/.nvm/versions/node/v14.15.0/bin/node',
1 verbose cli '/home/dylan/.nvm/versions/node/v14.15.0/bin/npm',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v14.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle cleanapp@0.1.0~prestart: cleanapp@0.1.0
6 info lifecycle cleanapp@0.1.0~start: cleanapp@0.1.0
7 verbose lifecycle cleanapp@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle cleanapp@0.1.0~start: PATH: /home/dylan/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/dylan/Desktop/Werk/Professional stuff/SkylimitHost/node_modules/.bin:/home/dylan/.nvm/versions/node/v14.15.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle cleanapp@0.1.0~start: CWD: /home/dylan/Desktop/Werk/Professional stuff/SkylimitHost
10 silly lifecycle cleanapp@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle cleanapp@0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle cleanapp@0.1.0~start: Failed to exec start script
13 verbose stack Error: cleanapp@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/dylan/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (/home/dylan/.nvm/versions/node/v14.15.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid cleanapp@0.1.0
15 verbose cwd /home/dylan/Desktop/Werk/Professional stuff/SkylimitHost
16 verbose Linux 5.4.0-53-generic
17 verbose argv "/home/dylan/.nvm/versions/node/v14.15.0/bin/node" "/home/dylan/.nvm/versions/node/v14.15.0/bin/npm" "start"
18 verbose node v14.15.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error cleanapp@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the cleanapp@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I don't understand why my server won't start, any help would be appreciated.
I've found out the solution. This error is just a fancy/convoluted missing dependencies message. If you install all the dependencies the project needs (some might not be in the package.json file) it should work correctly.
In my case, it was because of a missing package in package.json.
yarn start
or npm run start
didn't help me find the missing package. To find the missing one, try running the build command (yarn build
), build will exit with the error details as below.
As the above screenshot says, there was a missing package (in my case react-dnd-html5-backend
).