Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

After Node update, Issue running npm run production #1011

Closed
adambundy opened this issue Jul 12, 2017 · 23 comments
Closed

After Node update, Issue running npm run production #1011

adambundy opened this issue Jul 12, 2017 · 23 comments

Comments

@adambundy
Copy link

Just updated Node and this particular project is failing to run the production task. Running watch does work however.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'production' ]
2 info using npm@5.0.4
3 info using node@v6.11.0
4 verbose run-script [ 'preproduction', 'production', 'postproduction' ]
5 info lifecycle foundationpress@2.6.1preproduction: foundationpress@2.6.1
6 silly lifecycle foundationpress@2.6.1
preproduction: no script for preproduction, continuing
7 info lifecycle foundationpress@2.6.1production: foundationpress@2.6.1
8 verbose lifecycle foundationpress@2.6.1
production: unsafe-perm in lifecycle true
9 verbose lifecycle foundationpress@2.6.1production: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/adambundy/Documents/iMac i7_2 CLIENT FILES/A+ Colorado/apluscolorado.org/wp-content/themes/FoundationPress/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle foundationpress@2.6.1
production: CWD: /Users/adambundy/Documents/iMac i7_2 CLIENT FILES/A+ Colorado/apluscolorado.org/wp-content/themes/FoundationPress
11 silly lifecycle foundationpress@2.6.1production: Args: [ '-c', 'gulp --production' ]
12 silly lifecycle foundationpress@2.6.1
production: Returned: code: 1 signal: null
13 info lifecycle foundationpress@2.6.1~production: Failed to exec production script
14 verbose stack Error: foundationpress@2.6.1 production: gulp --production
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:891:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid foundationpress@2.6.1
16 verbose cwd /Users/adambundy/Documents/iMac i7_2 CLIENT FILES/A+ Colorado/apluscolorado.org/wp-content/themes/FoundationPress
17 verbose Darwin 16.6.0
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "production"
19 verbose node v6.11.0
20 verbose npm v5.0.4
21 error code ELIFECYCLE
22 error errno 1
23 error foundationpress@2.6.1 production: gulp --production
23 error Exit status 1
24 error Failed at the foundationpress@2.6.1 production script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

@adambundy
Copy link
Author

Anyone have an idea of how to fix this FP install or repair my Node setup? Thanks in advance for any help!

FoundationPress 2.6.1
MacOS v10.12.5
Node v6.11.0
Foundation 6.2

@pablopaul
Copy link

@adambundy can you try to the latest FoundationPress and Foundation version and see if the error still exists?

@olefredrik
Copy link
Owner

Please try npm rebuild node-sass and let me know how it goes.

@adambundy
Copy link
Author

@olefredrik I get a long log of the updates, then at the bottom an alert to update NPM:

Update available 5.0.4 → 5.3.0 Run npm i -g npm to update

Should I perform this update? Im going to re-try running production now...

Thank you very much for your response, help!

@adambundy
Copy link
Author

@olefredrik, I ran that npm update, and am still failing on run of production. I get a long log of info, then the following at the bottom:

[08:06:40] Starting 'javascript'...
[08:06:41] Starting 'lint'...
path.js:7
throw new TypeError('Path must be a string. Received ' + inspect(path));
^

TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.dirname (path.js:1324:5)
at {...}/FoundationPress/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:191:56
at Array.forEach (native)
at trackContentSources ({...}/FoundationPress/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:188:20)
at InputSourceMapStore.trackLoaded ({...}/FoundationPress/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:255:3)
at fromString ({...}/FoundationPress/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:32:8)
at InputSourceMapStore.track ({...}/FoundationPress/node_modules/gulp-minify-css/node_modules/clean-css/lib/utils/input-source-map-tracker.js:236:5)
at Object.whenDone ({...}/FoundationPress/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:145:44)
at processNext ({...}/FoundationPress/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:105:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! foundationpress@2.6.1 production: gulp --production
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the foundationpress@2.6.1 production 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! {...}.npm/_logs/2017-07-19T14_06_45_003Z-debug.log

Thanks for your help thus far - any ideas?

@uptownstudios
Copy link

Try this:

npm uninstall gulp --save

Then once that is complete run:

npm install

then:

npm run build

Then npm run production should work.

@adambundy
Copy link
Author

@uptownstudios thanks very much. Looks like the gulp uninstall is causing a new error now. At npm install I get:

foundationpress@2.6.1 postinstall {...}/themes/FoundationPress
bower install && gulp build

(node:3017) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
sh: gulp: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! foundationpress@2.6.1 postinstall: bower install && gulp build
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the foundationpress@2.6.1 postinstall 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! {...}/.npm/_logs/2017-07-19T19_46_05_802Z-debug.log

@olefredrik
Copy link
Owner

That's weird, because I'm running Node v6.11.1 and npm v3.10.10 on Mac OS and I'm able to do a npm install with no errors.

Can you run node -v and npm -v and see what exact versions you're using? (Tip: you can easily switch between different versions of Node and npm with nvm).

If you're running Node v6.11.1 and npm v3.10.10, run a npm rebuild node-sass , delete the node_modules folder and do another npm install.

@adambundy
Copy link
Author

@olefredrik thanks again for your response! I can verify Im running Node 6.1.0 but npm v5.3.0 - is that npm version too high for FP?

@adambundy
Copy link
Author

@olefredrik Im not sure I could tell you how I got there :) but I was able to get back to running Node v6.11.1 and npm v3.10.10 by following the steps you detailed above. I am now able to run production. Thanks very much to you and @uptownstudios for your help! Much appreciated.

@sonaskyla12
Copy link

please help me ...currently i m working on windows
with npm -v =5.3.0 and node -v =v10.4.0 and i m getting this error
'nodemon' is not recognized as an internal and external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! erno 1
npm ERR! mernstack@1.0.0 server : 'nodemon server js'
npm ERR! Exit status 1
npm ERR! failed at the mernstack@1.0.0 server script
npm ERR! this probably not the problem with npm .There is additional logging output above
npm ERR! A complete log of this run can be found in :
C:\User\shubhendu\APPdata\roaming\npm-cache_logs\2018-06-22T03_20_40_649Z-debug.log

@bisht-thawb
Copy link

Thank you a lot @uptownstudios . Its works for me.

@nutan0143sonu
Copy link

please help me......i got this error
npm ERR! Unexpected end of JSON input while parsing near '...":{"airtap":"0.0.9","'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Nutan Gupta\AppData\Roaming\npm-cache_logs\2018-11-26T20_05_37_565Z-debug.log

@nutan0143sonu
Copy link

Currently i am working on window so please help me

@patilsumit
Copy link

how to solve error please in linux

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactjs-basics@1.0.0 build: webpack -d && cp src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactjs-basics@1.0.0 build 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/wsa/.npm/_logs/2018-12-17T12_34_38_311Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactjs-basics@1.0.0 start: npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactjs-basics@1.0.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/wsa/.npm/_logs/2018-12-17T12_34_38_361Z-debug.log

@patilsumit
Copy link

Thanks a lot Brother @uptownstudios Finally Working

@gselvamary
Copy link

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@6.5.0
3 info using node@v10.13.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle client@0.1.0prebuild: client@0.1.0
6 info lifecycle client@0.1.0
build: client@0.1.0
7 verbose lifecycle client@0.1.0build: unsafe-perm in lifecycle true
8 verbose lifecycle client@0.1.0
build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/tlc-01/Documents/test/mernproject/ict-practice/server/client/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin
9 verbose lifecycle client@0.1.0build: CWD: /Users/tlc-01/Documents/test/mernproject/ict-practice/server/client
10 silly lifecycle client@0.1.0
build: Args: [ '-c', 'react-scripts build' ]
11 silly lifecycle client@0.1.0build: Returned: code: 1 signal: null
12 info lifecycle client@0.1.0
build: Failed to exec build script
13 verbose stack Error: client@0.1.0 build: react-scripts build
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid client@0.1.0
15 verbose cwd /Users/tlc-01/Documents/test/mernproject/ict-practice/server/client
16 verbose Darwin 18.2.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v10.13.0
19 verbose npm v6.5.0
20 error code ELIFECYCLE
21 error errno 1
22 error client@0.1.0 build: react-scripts build
22 error Exit status 1
23 error Failed at the client@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 ]
i am using mac os and node npm express... getting this error while build

@gselvamary
Copy link

my server package.json
{
"name": "mary_app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"client-install": "npm install --prefix client",
"start": "node index.js",
"server": "nodemon index.js",
"client": "npm start --prefix client",
"dev": "concurrently "npm run server" "npm run client"",
"build": "npm build --prefix client"
},
"author": "",
"license": "ISC",
"dependencies": {
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.3",
"concurrently": "^4.1.0",
"express": "^4.16.4",
"is-empty": "^1.2.0",
"jsonwebtoken": "^8.4.0",
"mongoose": "^5.3.15",
"morgan": "^1.9.1",
"multer": "^1.4.1",
"passport": "^0.4.0",
"passport-jwt": "^4.0.0",
"validator": "^10.11.0"
},
"devDependencies": {
"nodemon": "^1.18.7"
}
}

@gselvamary
Copy link

my client json
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"@date-io/date-fns": "^1.0.1",
"@material-ui/core": "^3.9.0",
"@material-ui/icons": "^3.0.2",
"axios": "^0.18.0",
"bootstrap": "^4.1.3",
"classnames": "^2.2.6",
"date-fns": "^2.0.0-alpha.25",
"jwt-decode": "^2.2.0",
"material-ui-chip-input": "^0.19.0",
"material-ui-pickers": "^2.1.1",
"material-ui-upload": "^1.2.1",
"mathquill": "^0.10.1-a",
"mathquill-jquery": "0.0.2",
"mui-datatables": "^2.0.0-beta-53",
"prop-types": "^15.6.2",
"react": "^16.6.3",
"react-dnd": "^7.0.2",
"react-dnd-html5-backend": "^7.0.2",
"react-dom": "^16.7.0",
"react-mathjax2": "0.0.2",
"react-redux": "^6.0.0",
"react-router-dom": "^4.3.1",
"react-scripts": "^2.1.1",
"react-tag-input": "^6.2.1",
"react-transition-group": "^1.2.1",
"reactstrap": "^6.5.0",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0",
"uuid": "^3.3.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"proxy": "http://localhost:5000",
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

@gselvamary
Copy link

can some one help me to do

@muhyidin3222
Copy link

try paste this code in your terminal

sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288

@Raj2367
Copy link

Raj2367 commented Mar 31, 2019

Try this:

npm uninstall gulp --save

Then once that is complete run:

npm install

then:

npm run build

Then npm run production should work.

thank a lot @uptownstudios ...
it works for me...
again thanks so so so much...

@jontheartist
Copy link

Try this:
npm uninstall gulp --save
Then once that is complete run:
npm install
then:
npm run build
Then npm run production should work.

thank a lot @uptownstudios ...
it works for me...
again thanks so so so much...

thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests