SailsJS app on OpenShift cannot start - node.js

I am new to NodeJS/SailsJS and am trying to work with OpenShift for the very first time. There could be a lot of stupid shortcomings at my end, so please keep my primitive skill level in mind.
I have a SailsJS app that is up and running on Heroku's free service. It is fully functional and in use. However, in order to try out a different, more complex platform and to explore my options, I also want to deploy it on OpenShift.
I followed some tutorials and finally managed to get my code cloned (from a private repo, I ran into some trouble providing SSH access to OpenShift) and built. The build is successful but the deployment/pod shows an error. The logs read as follows
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
npm info lifecycle wopple#0.0.1~start: Failed to exec start script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wopple#0.0.1 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wopple#0.0.1 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! /opt/app-root/src/.npm/_logs/2018-04-14T18_38_59_717Z-debug.log
Log file:
0 info it worked if it ends with ok
1 verbose cli [ '/opt/rh/rh-nodejs8/root/usr/bin/node',
1 verbose cli '/opt/rh/rh-nodejs8/root/usr/bin/npm',
1 verbose cli 'run',
1 verbose cli '-d',
1 verbose cli 'start' ]
2 info using npm#5.6.0
3 info using node#v8.9.4
4 verbose config Skipping project config: /opt/app-root/src/.npmrc. (matches userconfig)
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info lifecycle wopple#0.0.1~prestart: wopple#0.0.1
7 info lifecycle wopple#0.0.1~start: wopple#0.0.1
8 verbose lifecycle wopple#0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle wopple#0.0.1~start: PATH: /opt/rh/rh-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/npm-lifecycle/node-gyp-bin:/opt/app-root/src/node_modules/.bin:/opt/rh/rh-nodejs8/root/usr/bin:/opt/app-root/src/node_modules/.bin/:/opt/app-root/src/.npm-global/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
10 verbose lifecycle wopple#0.0.1~start: CWD: /opt/app-root/src
11 silly lifecycle wopple#0.0.1~start: Args: [ '-c', 'node app.js' ]
12 silly lifecycle wopple#0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle wopple#0.0.1~start: Failed to exec start script
14 verbose stack Error: wopple#0.0.1 start: `node app.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/opt/rh/rh-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/
npm-lifecycle/index.js:285:16)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at EventEmitter.emit (events.js:214:7)
14 verbose stack at ChildProcess.<anonymous> (/opt/rh/rh-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/
npm-lifecycle/lib/spawn.js:55:14)
14 verbose stack at emitTwo (events.js:126:13)
14 verbose stack at ChildProcess.emit (events.js:214:7)
14 verbose stack at maybeClose (internal/child_process.js:925:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
15 verbose pkgid wopple#0.0.1
16 verbose cwd /opt/app-root/src
17 verbose Linux 3.10.0-693.15.2.el7.x86_64
18 verbose argv "/opt/rh/rh-nodejs8/root/usr/bin/node" "/opt/rh/rh-nodejs8/root/usr/bin/npm" "run" "-d" "start"
19 verbose node v8.9.4
20 verbose npm v5.6.0
21 error code ELIFECYCLE
22 error errno 1
23 error wopple#0.0.1 start: `node app.js`
23 error Exit status 1
24 error Failed at the wopple#0.0.1 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
I believe there are ample OpenShift professionals here to help figure this thing out. Do comment if something else needs to be shared from the code.
Thanks in advance!

Related

After "npx create-react-app" "npm start" fails with following error: TypeError: Cannot read property 'split' of undefined

Node v12.18.4
Npm 6.14.11
react-scripts 4.0.1
Hello, this is not my first react-app but I am getting an error that makes no sense.
After using "npx create-react-app" cd into my app and "npm start" I am getting this error
/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/react-scripts/scripts/start.js:19
throw err;
^
TypeError: Cannot read property 'split' of undefined
at processModule (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/eslint-webpack-plugin/dist/index.js:93:38)
at SyncHook.eval [as call] (eval at create (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:5:1)
at SyncHook.lazyCompileHook (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/tapable/lib/Hook.js:154:20)
at /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/Compilation.js:781:30
at MultiModule.build (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/MultiModule.js:39:10)
at Compilation.buildModule (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/Compilation.js:739:10)
at /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/Compilation.js:1111:12
at MultiModuleFactory.create (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/MultiModuleFactory.js:18:3)
at /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/Compilation.js:1063:18
at Semaphore.acquire (/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/webpack/lib/util/Semaphore.js:29:4)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todo-app#0.1.0 start: `./node_modules/react-scripts/bin/react-scripts.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todo-app#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! /Users/pablodeyzaguirre/.npm/_logs/2021-01-19T13_21_16_205Z-debug.log
MBP-de-Pablo:todo-app pablodeyzaguirre$
I have deleted node_modules and installed again, installed react-scripts globally, updated npm & react version.
The full log of the error is:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm#6.14.11
3 info using node#v12.18.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle todo-app#0.1.0~prestart: todo-app#0.1.0
6 info lifecycle todo-app#0.1.0~start: todo-app#0.1.0
7 verbose lifecycle todo-app#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle todo-app#0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app/node_modules/.bin:/Users/pablodeyzaguirre/.symfony/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/pablodeyzaguirre/.symfony/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Users/pablodeyzaguirre/Library/Android/sdk/emulator:/Users/pablodeyzaguirre/Library/Android/sdk/tools:/Users/pablodeyzaguirre/Library/Android/sdk/tools/bin:/Users/pablodeyzaguirre/Library/Android/sdk/platform-tools:/Users/pablodeyzaguirre/Library/Android/sdk/emulator:/Users/pablodeyzaguirre/Library/Android/sdk/tools:/Users/pablodeyzaguirre/Library/Android/sdk/tools/bin:/Users/pablodeyzaguirre/Library/Android/sdk/platform-tools
9 verbose lifecycle todo-app#0.1.0~start: CWD: /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app
10 silly lifecycle todo-app#0.1.0~start: Args: [ '-c', './node_modules/react-scripts/bin/react-scripts.js start' ]
11 silly lifecycle todo-app#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle todo-app#0.1.0~start: Failed to exec start script
13 verbose stack Error: todo-app#0.1.0 start: `./node_modules/react-scripts/bin/react-scripts.js start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/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> (/usr/local/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:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid todo-app#0.1.0
15 verbose cwd /Users/pablodeyzaguirre/Documents/Personal/TechnicalTests/informa/todo-app
16 verbose Darwin 20.2.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v12.18.4
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error todo-app#0.1.0 start: `./node_modules/react-scripts/bin/react-scripts.js start`
22 error Exit status 1
23 error Failed at the todo-app#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 ]
If someone has encountered this problem before pls help, I have been looking around in google and stackoverflow with no luck
Encountered basically the same issue as you. For us it ended up being special quotes in our env variables. Once we removed those, it all worked ... 🤯
Took a work day to figure this one out!

Unable to launch React Project

Please find the error logs which I am getting in the terminal
fruits-vegetables#0.1.0 start C:\Users\MY PC\My_Front_End\fruits-vegetables
> react-scripts start
Could not find a required file.
Name: index.html
Searched in: C:\Users\MY PC\My_Front_End\fruits-vegetables\public
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fruits-vegetables#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fruits-vegetables#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! C:\Users\MY PC\AppData\Roaming\npm-cache\_logs\2019-12-20T15_57_41_927Z-debug.log
Please find the debug error log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\MY PC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.13.4
3 info using node#v12.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle fruits-vegetables#0.1.0~prestart: fruits-vegetables#0.1.0
6 info lifecycle fruits-vegetables#0.1.0~start: fruits-vegetables#0.1.0
7 verbose lifecycle fruits-vegetables#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle fruits-vegetables#0.1.0~start: PATH: C:\Users\MY PC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\MY PC\My_Front_End\fruits-vegetables\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Users\MY PC\AppData\Local\Microsoft\WindowsApps;C:\Users\MY PC\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\MY PC\AppData\Roaming\npm;C:\Program Files\Git\bin;C:\Program Files (x86)\Nmap
9 verbose lifecycle fruits-vegetables#0.1.0~start: CWD: C:\Users\MY PC\My_Front_End\fruits-vegetables
10 silly lifecycle fruits-vegetables#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle fruits-vegetables#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle fruits-vegetables#0.1.0~start: Failed to exec start script
13 verbose stack Error: fruits-vegetables#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\MY PC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:209:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\MY PC\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:209:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid fruits-vegetables#0.1.0
15 verbose cwd C:\Users\MY PC\My_Front_End\fruits-vegetables
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\MY PC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.10.0
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error fruits-vegetables#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the fruits-vegetables#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 ]
Moreover, I have already tried these suggestions:
delete node modules and package-lock.json
then ran command: npm update
then ran command: npm install
and when I ran npm start I got the same error as above
One more thing which I noticed, whenever I freshly install a react app then I used to get App.js, index.js, index.html even a src folder, I am not getting all these. Please help!
I'm also faced this issue before but fortunately i fixed it for ever you can fix this by going to the ->control pannel ->system and security ->system-> advanced system settings ->environment variables look for system variables and look for ComSpec make sure the path is like this C:\Windows\system32\cmd.exe and restart the system and see it will work

After ejecting create-react-app to update packages, "webpack is not a function"

Using an older version create-react-app on an experimental boilerplate project, I needed to update the packages to proceed. I thought the best way to do this was to eject the create-react-app, but now the whole thing won't run. This is the output after Nodemon:
[1] Failed to compile.
[1]
[1] webpack is not a function
[1]
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! client#0.1.0 start: `node scripts/start.js`
[1] npm ERR! Exit status 1
[1] npm ERR!
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.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! /Users/gabrielkunkel/.npm/_logs/2019-11-20T23_19_58_956Z-debug.log
If I search the complete log, webpack doesn't show up at all. I wish I could narrow this down to something just useful.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin/node',
1 verbose cli '/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin/npm',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.13.1
3 info using node#v12.8.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle client#0.1.0~prestart: client#0.1.0
6 info lifecycle client#0.1.0~start: client#0.1.0
7 verbose lifecycle client#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle client#0.1.0~start: PATH: /Users/gabrielkunkel/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/gabrielkunkel/Documents/DevCodeCamp/Capstone/kunkl-project/client/node_modules/.bin:/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/gabrielkunkel/Documents/DevCodeCamp/Capstone/kunkl-project/node_modules/.bin:/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/git/bin:/usr/local/MacGPG2/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/gabrielkunkel/.rvm/bin:/Users/gabrielkunkel/.rvm/bin
9 verbose lifecycle client#0.1.0~start: CWD: /Users/gabrielkunkel/Documents/DevCodeCamp/Capstone/kunkl-project/client
10 silly lifecycle client#0.1.0~start: Args: [ '-c', 'node scripts/start.js' ]
11 silly lifecycle client#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle client#0.1.0~start: Failed to exec start script
13 verbose stack Error: client#0.1.0 start: `node scripts/start.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:203:13)
13 verbose stack at ChildProcess.<anonymous> (/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:203:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid client#0.1.0
15 verbose cwd /Users/gabrielkunkel/Documents/DevCodeCamp/Capstone/kunkl-project/client
16 verbose Darwin 16.7.0
17 verbose argv "/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin/node" "/Users/gabrielkunkel/.nvm/versions/node/v12.8.1/bin/npm" "start"
18 verbose node v12.8.1
19 verbose npm v6.13.1
20 error code ELIFECYCLE
21 error errno 1
22 error client#0.1.0 start: `node scripts/start.js`
22 error Exit status 1
23 error Failed at the client#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 tried cleaning out the node_modules and re-installing them off a suggestion here, with a slightly different problem. I even tried installing webpack globally.
I'm hoping to just fix some small thing and keep going or at least understand why it can't run webpack. As it is, I'm going to be saving all the files and rerun create-react-app unless you can help me.
Your best bet is to build a new create-react-app in a separate folder then to run npm run eject. You then use version control to see the differences in the package.json as well as the config and script folders/files. Update your node modules to match those of the newly created create-react-app and copy/paste the config files.

Brand new react/node.js project wont run on opensuse

I'm currently learning Express and react right now and was able to run react app originally. While starting a new web app(Yesterday), I was not able to prevent a freshly created react app from crashing.
My OS:
openSUSE 20180522 <br>
Kernel: x86_64 Linux 4.16.9-1-default
The error:
$ npm start
> movieapp#0.1.0 start
/home/knosence/Templates/syntelBootCamp/react/movieapp
> react-scripts start
Attempting to bind to HOST environment variable: linux-gz59
If this was unintentional, check that you haven't mistakenly set it
in your shell.
Learn more here: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration
events.js:183
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND linux-gz59
at errnoException (dns.js:50:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! movieapp#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the movieapp#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/knosence/.npm/_logs/2018-05-24T20_48_01_951Z-
debug.log
`
$ cat /home/knosence/.npm/_logs/2018-05-24T20_48_01_951Z-debug.log<br>
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node8', '/usr/local/bin/npm', 'start' ]
2 info using npm#6.0.1
3 info using node#v8.11.2
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle movieapp#0.1.0~prestart: movieapp#0.1.0
6 info lifecycle movieapp#0.1.0~start: movieapp#0.1.0
7 verbose lifecycle movieapp#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle movieapp#0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/knosence/Templates/syntelBootCamp/react/movieapp/node_modules/.bin:/home/knosence/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/sbin:/snap/bin
9 verbose lifecycle movieapp#0.1.0~start: CWD: /home/knosence/Templates/syntelBootCamp/react/movieapp
10 silly lifecycle movieapp#0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle movieapp#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle movieapp#0.1.0~start: Failed to exec start script
13 verbose stack Error: movieapp#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:283:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid movieapp#0.1.0
15 verbose cwd /home/knosence/Templates/syntelBootCamp/react/movieapp
16 verbose Linux 4.16.9-1-default
17 verbose argv "/usr/bin/node8" "/usr/local/bin/npm" "start"
18 verbose node v8.11.2
19 verbose npm v6.0.1
20 error code ELIFECYCLE
21 error errno 1
22 error movieapp#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the movieapp#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 ]
`
If anyone can help me with this then it will be greatly appreciated!! If anyone needs more information, let me know and I will provide. Thanks!
Your machine probably has a global HOST environment variable so Create React App tries to find an open port on it instead of the default localhost. Delete the environment variable and it should work fine as you want.
Maybe this answer will help you.
Create-react-app error
I faced the same issue and fixed it using
HOST=localhost npm start
Hope that it helps anyone else!

ELIFECYCLE npm error

This is the error in my console
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! sedona#0.1.0 start: `npm run build && gulp serve`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the sedona#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! C:\Users\User\AppData\Roaming\npm-cache\_logs\2017-07-21T19_40_30_516Z
-debug.log
This is the "debug.log" file from AppData/Roaming etc. path
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#5.3.0
3 info using node#v8.2.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle sedona#0.1.0~prestart: sedona#0.1.0
6 info lifecycle sedona#0.1.0~start: sedona#0.1.0
7 verbose lifecycle sedona#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle sedona#0.1.0~start: PATH: D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\User\Desktop\user.github.io\node_modules\.bin;C:\Users\User\Desktop\cmder\bin;C:\Users\User\Desktop\cmder\vendor\git-for-windows\cmd;C:\Users\User\Desktop\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\Users\User\Desktop\cmder\vendor\conemu-maximus5;C:\Users\User\Desktop\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Skype\Phone\;D:\Program Files\nodejs\;C:\Users\User\AppData\Roaming\npm;C:\Users\User\Desktop\cmder\vendor\git-for-windows\usr\bin;C:\Users\User\Desktop\cmder\vendor\git-for-windows\usr\share\vim\vim74;C:\Users\User\Desktop\cmder\
9 verbose lifecycle sedona#0.1.0~start: CWD: C:\Users\User\Desktop\user.github.io
10 silly lifecycle sedona#0.1.0~start: Args: [ '/d /s /c', 'npm run build && gulp serve' ]
11 silly lifecycle sedona#0.1.0~start: Returned: code: 3221225477 signal: null
12 info lifecycle sedona#0.1.0~start: Failed to exec start script
13 verbose stack Error: sedona#0.1.0 start: `npm run build && gulp serve`
13 verbose stack Exit status 3221225477
13 verbose stack at EventEmitter.<anonymous> (D:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (D:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:921:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid sedona#0.1.0
15 verbose cwd C:\Users\user\Desktop\user.github.io
16 verbose Windows_NT 6.1.7601
17 verbose argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v8.2.1
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 3221225477
22 error sedona#0.1.0 start: `npm run build && gulp serve`
22 error Exit status 3221225477
23 error Failed at the sedona#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 [ 3221225477, true ]
I have already downloaded another gulp-sass projects from other peolpe github's and replace it contains with my own html-sass-js-img files. Error still here btw.
I have already reinstall cmder and node.js. Twice. Error still here.
I have already delete "node-modules" folder from my project and made "npm i" command - nothing changed.
And one fun thing - files in folder "build" updated like always (if you manual lauch them in browser like in old times). But in root folder seems like gulp-sass just don't see that anything happen and zero changes displayed in localhost 3000.
My previous build from yesterday work fine (seemingly) and builds from another people from github work fine too, but why my new build with some changes make that crash??? Only cause sass files changed?
So, there's an interesting cause of this in Jest in VSCode while debugging with Node 12.4.0. When running jest and babel, and placing breakpoints in static classes, the second you place them in the static class, in a static method, node throws this error. To fix, dont write weird static classes.

Resources