JavaScript for WordPress Forums Bugs & Issues npm ERR! code ELIFECYCLE on Terminal

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #127761
    dareadel
    Participant

    I am going through the Javarscript, React & WordPress workshop and I couldn’t get past the ‘npm install’ on the starter folder.

    I went through the recommended solutions at https://stackoverflow.com/ but it did not help. Here are the error messages I was getting:

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! step-00-practice@0.1.0 start: react-scripts start
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the step-00-practice@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/.../.npm/_logs/2019-12-06T17_13_16_461Z-debug.log

    I will appreciate your assistance.

    Dare

    #127815
    dareadel
    Participant

    Here is the error log:

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
    2 info using npm@5.8.0
    3 info using node@v6.10.3
    4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
    5 info lifecycle step-00-practice@0.1.0~prebuild: step-00-practice@0.1.0
    6 info lifecycle step-00-practice@0.1.0~build: step-00-practice@0.1.0
    7 verbose lifecycle step-00-practice@0.1.0~build: unsafe-perm in lifecycle true
    8 verbose lifecycle step-00-practice@0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/.../Desktop/jsforwp-conf-workshop-2019/react/starter/node_modules/.bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
    9 verbose lifecycle step-00-practice@0.1.0~build: CWD: /Users/.../Desktop/jsforwp-conf-workshop-2019/react/starter
    10 silly lifecycle step-00-practice@0.1.0~build: Args: [ '-c', 'react-scripts build' ]
    11 silly lifecycle step-00-practice@0.1.0~build: Returned: code: 1  signal: null
    12 info lifecycle step-00-practice@0.1.0~build: Failed to exec build script
    13 verbose stack Error: step-00-practice@0.1.0 build: <code>react-scripts build</code>
    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:106:13)
    13 verbose stack     at EventEmitter.emit (events.js:191: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:106:13)
    13 verbose stack     at ChildProcess.emit (events.js:191:7)
    13 verbose stack     at maybeClose (internal/child_process.js:886:16)
    13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    14 verbose pkgid step-00-practice@0.1.0
    15 verbose cwd /Users/.../Desktop/jsforwp-conf-workshop-2019/react/starter
    16 verbose Darwin 18.7.0
    17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
    18 verbose node v6.10.3
    19 verbose npm  v5.8.0
    20 error code ELIFECYCLE
    21 error errno 1
    22 error step-00-practice@0.1.0 build: <code>react-scripts build</code>
    22 error Exit status 1
    23 error Failed at the step-00-practice@0.1.0 build script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 1, true ]

    Right now nothing works after “run install” and I have re-installed all files twice

    #127816
    Zac Gordon
    Keymaster

    Hi! What folder are you running this command in?

    #127821
    Zac Gordon
    Keymaster

    Okay, see where you’re running. I tried duplicating the issue on my end and wasn’t able to to.

    Do any of the other React exercise folders work for you?

    #127822
    dareadel
    Participant

    I was able to do all the exercises until the first lesson in react. I didn’t try any other build folder because I was unable to create the build folder. I’ve been stuck on this all day. I checked atom forum and couldn’t find any solution too.

    #128120
    dareadel
    Participant

    Here is the solution I got from this post on Stackoveflow.com. Spent two days looking for a solution and it paid off. Apparently all I needed was an upgrade:

    1. sudo npm cache clean -f (force) clear you npm cache
    2. sudo npm install -g n install n (this might take a while)
    3. sudo n stable upgrade to the current stable version

    #128148
    Zac Gordon
    Keymaster

    Glad you got it sorted! Thanks for sharing the solution 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.