Related
This is the issue I am facing when running npm install to install dependencies for the application I am trying to run. I'm new to Node and React:
> cd core && npm ci
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-native-fs#2.18.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#"17.0.2" from the root project
npm ERR! peer react#"^17.0.2" from #aries-framework/react-hooks#0.3.0
npm ERR! node_modules/#aries-framework/react-hooks
npm ERR! peer #aries-framework/react-hooks#"^0.3.0" from the root project
npm ERR! 31 more (#expo/react-native-action-sheet, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-windows#"*" from react-native-fs#2.18.0
npm ERR! node_modules/react-native-fs
npm ERR! peer react-native-fs#"^2.16.6" from the root project
npm ERR! peer react-native-fs#"^2.18.0" from #aries-framework/react-native#0.2.2
npm ERR! node_modules/#aries-framework/react-native
npm ERR! peer #aries-framework/react-native#"^0.2.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#18.1.0
npm ERR! node_modules/react
npm ERR! peer react#"18.1.0" from react-native-windows#0.70.5
npm ERR! node_modules/react-native-windows
npm ERR! peer react-native-windows#"*" from react-native-fs#2.18.0
npm ERR! node_modules/react-native-fs
npm ERR! peer react-native-fs#"^2.16.6" from the root project
npm ERR! 1 more (#aries-framework/react-native)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/samueloneill/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/samueloneill/.npm/_logs/2022-11-08T11_54_30_572Z-debug-0.log
ERROR: "ci:core" exited with 1.
ERROR: "ci:all" exited with 1.
npm ERR! code 1
npm ERR! path /Users/samueloneill/aries-mobile-agent-react-native
npm ERR! command failed
npm ERR! command sh -c run-s ci:all build:all
I've tried npm install --legacy-peer-deps resulting in a ✖ Failed to build definition files error.
Any help would be greatly appreciated!!
Edit: here are the dependencies from the package.json
"#aries-framework/core": "^0.2.2",
"#aries-framework/react-hooks": "^0.3.0",
"#aries-framework/react-native": "^0.2.0",
"#formatjs/intl-datetimeformat": "^4.2.3",
"#formatjs/intl-displaynames": "^5.2.3",
"#formatjs/intl-getcanonicallocales": "^1.7.3",
"#formatjs/intl-listformat": "^6.3.3",
"#formatjs/intl-locale": "^2.4.37",
"#formatjs/intl-numberformat": "^7.2.3",
"#formatjs/intl-pluralrules": "^4.1.3",
"#formatjs/intl-relativetimeformat": "^9.2.3",
"#react-native-async-storage/async-storage": "^1.12.1",
"#react-native-community/masked-view": "^0.1.11",
"#react-native-community/netinfo": "^9.3.0",
"#react-navigation/bottom-tabs": "^6.0.9",
"#react-navigation/core": "^6.1.0",
"#react-navigation/devtools": "^6.0.8",
"#react-navigation/native": "^6.0.6",
"#react-navigation/stack": "^6.0.11",
"axios": "^0.21.0",
"i18next": "^21.4.0",
"indy-sdk-react-native": "^0.2.2",
"lodash.flatten": "^4.4.0",
"lodash.startcase": "^4.4.0",
"query-string": "^7.0.1",
"react": "17.0.2",
"react-i18next": "^11.13.0",
"react-native": "0.66.5",
"react-native-animated-pagination-dots": "^0.1.72",
"react-native-argon2": "^2.0.1",
"react-native-bouncy-checkbox": "^3.0.5",
"react-native-camera": "^3.31.1",
"react-native-collapsible": "^1.6.0",
"react-native-config": "^1.4.2",
"react-native-confirmation-code-field": "^7.3.0",
"react-native-device-info": "^8.4.9",
"react-native-encrypted-storage": "^4.0.2",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.10.3",
"react-native-get-random-values": "^1.7.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-keychain": "^8.1.1",
"react-native-localize": "^2.1.5",
"react-native-qrcode-svg": "^6.0.6",
"react-native-reanimated": "^2.2.4",
"react-native-safe-area-context": "^3.2.0",
"react-native-scalable-image": "^1.1.0",
"react-native-screens": "^3.3.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^12.1.1",
"react-native-toast-message": "^2.0.1",
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^8.1.0",
"uuid": "^8.1.0"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.12.5",
"#commitlint/cli": "^11.0.0",
"#react-native-community/eslint-config": "^2.0.0",
"#testing-library/jest-native": "^4.0.4",
"#testing-library/react-native": "^9.0.0",
"#types/indy-sdk-react-native": "npm:#types/indy-sdk#^1.16.18",
"#types/jest": "^27.4.0",
"#types/lodash.flatten": "^4.4.6",
"#types/lodash.startcase": "^4.4.6",
"#types/react": "^16.14.4",
"#types/react-native": "^0.63.50",
"#types/react-native-vector-icons": "^6.4.6",
"#types/react-test-renderer": "^16.9.5",
"#typescript-eslint/eslint-plugin": "^4.20.0",
"#typescript-eslint/parser": "^4.33.0",
"babel-jest": "^27.5.1",
"babel-plugin-module-resolver": "^4.1.0",
"commitlint": "^11.0.0",
"eslint": "^7.14.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^3.3.1",
"husky": "^7.0.0",
"jest": "^27.5.1",
"lint-staged": "^11.2.6",
"metro-react-native-babel-preset": "^0.66.2",
"mockdate": "^3.0.5",
"node-notifier": "^10.0.1",
"patch-package": "^6.4.4",
"prettier": "^2.1.2",
"react-native-builder-bob": "^0.18.2",
"react-native-flipper": "^0.154.0",
"react-native-svg-transformer": "^0.14.3",
"react-test-renderer": "17.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.2.2"
So here is what happens
tested on node v16.18.1/npm 8.19.2
you have react-native-fs which pools react-native-windows#0.70.5 you can fix it by adding "react-native-windows": "0.66.5" into your dependencies (same version as your react-native).
then you'll face issue with "react-native-scalable-image": "^1.1.0" which demands "react": "^16.8.3". So either get rid of react-native-scalable-image or ask maintainer to be less strict on react version
UPDATE 7 Dec 2022:
I had to
patch app/package.json and core/package.json
remove app/package-lock.json and core/package-lock.json
run npm i in app and core
After that dependencies can be installed however build still fails.
I must say the project has sick dependencies and requires a lot of attention to fix them
Index: app/package.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/package.json b/app/package.json
--- a/app/package.json (revision faffa2806a8980b0655a35a94fc7cabd32699922)
+++ b/app/package.json (revision d8f3ceca67e237fea1090451412e7297c5bb14bb)
## -40,6 +40,7 ##
"react": "17.0.2",
"react-i18next": "11.13.0",
"react-native": "0.66.5",
+ "react-native-windows": "0.66.5",
"react-native-animated-pagination-dots": "0.1.72",
"react-native-argon2": "2.0.1",
"react-native-bouncy-checkbox": "^3.0.5",
## -58,7 +59,6 ##
"react-native-qrcode-svg": "6.1.1",
"react-native-reanimated": "^2.2.4",
"react-native-safe-area-context": "3.3.2",
- "react-native-scalable-image": "^1.1.0",
"react-native-screens": "3.7.2",
"react-native-splash-screen": "3.3.0",
"react-native-svg": "12.1.1",
Index: core/package.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/package.json b/core/package.json
--- a/core/package.json (revision faffa2806a8980b0655a35a94fc7cabd32699922)
+++ b/core/package.json (revision d8f3ceca67e237fea1090451412e7297c5bb14bb)
## -48,6 +48,7 ##
"react": "17.0.2",
"react-i18next": "^11.13.0",
"react-native": "0.66.5",
+ "react-native-windows": "0.66.5",
"react-native-animated-pagination-dots": "^0.1.72",
"react-native-argon2": "^2.0.1",
"react-native-bouncy-checkbox": "^3.0.5",
## -66,7 +67,6 ##
"react-native-qrcode-svg": "^6.0.6",
"react-native-reanimated": "^2.2.4",
"react-native-safe-area-context": "^3.2.0",
- "react-native-scalable-image": "^1.1.0",
"react-native-screens": "^3.3.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^12.1.1",
I am using NPM and the project was going all fine. After a while, I deleted the node_modules folder and started getting the error.
System : Macbook Pro
2814 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
2815 verbose node v11.9.0
2816 verbose npm v6.5.0
2817 error Maximum call stack size exceeded
2818 verbose exit [ 1, true ]
Fixes tried:
Removed the package-lock.json and tried with npm i -> Still it gives the same error.
Tried with npm rebuild -> no luck
Tried with npm cache-clean --force -> no luck
While doing the investigation - if I remove "#frctl/fractal": "^1.1.7" from devDependencies - npm install works fine. Since, it was working fine until now. So, don't know the real cause of it.
Below is the devDependencies list:
"devDependencies": {
"#frctl/fractal": "^1.1.7",
"#frctl/mandelbrot": "^1.2.0",
"node-sass": "^4.11.0",
"angular": "^1.3.15",
"typescript": "^3.2.2",
"autoprefixer": "^6.7.7",
"browser-sync": "^2.18.8",
"del": "^2.2.2",
"glob": "^7.1.1",
"gulp": "^4.0.0",
"gulp-babel": "^6.1.2",
"gulp-changed": "^2.0.0",
"gulp-concat": "^2.6.1",
"gulp-environments": "^0.1.2",
"gulp-flatten": "^0.3.1",
"gulp-htmlmin": "^3.0.0",
"gulp-iconfont": "^10.0.2",
"gulp-iconfont-css": "^2.3.0",
"gulp-if": "^2.0.2",
"gulp-imagemin": "^3.2.0",
"gulp-notify": "^3.0.0",
"gulp-plumber": "^1.1.0",
"gulp-postcss": "^6.4.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^3.1.0",
"gulp-sass-glob": "^1.0.8",
"gulp-sourcemaps": "^2.4.1",
"gulp-surge": "^0.1.0",
"gulp-svg-sprite": "^1.3.6",
"gulp-svgmin": "^1.2.3",
"gulp-uglify": "^2.1.2",
"merge-stream": "^1.0.1",
"require-dir": "^0.3.1",
"#types/angular": "^1.6.53",
"#types/angular-mocks": "^1.7.0",
"#types/jasmine": "^3.3.7",
"#types/karma": "^1.7.1",
"#types/jquery": "^3.3.29",
"angular-mocks": "1.3.15",
"jasmine-core": "^2.8.0",
"jquery-ui": "^1.12.1",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "1.0.1",
"karma-coverage": "^1.1.2",
"karma-jasmine": "^1.1.0",
"karma-jquery": "^0.2.3",
"karma-junit-reporter": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-spec-reporter": "0.0.32",
"karma-typescript": "^3.0.13",
"ts-mockito": "^2.3.1",
"ts-node": "^8.0.1",
"#types/angular-translate": "^2.16.0",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-concat": "^0.5.1",
"#types/lodash": "^4.14.121"
}
Any suggestions for resolving this issue.
Thanks in advance!
I don't know if anyone has encountered this kind of issue or not. I fixed the issue by generating the package-lock.json and it fixes the build issue. Thanks for the support!
I too had this same issues
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /home/veluvijay/.npm/_logs/2019-12-09T05_54_58_567Z-debug.log
Package install failed, see above.
See "/tmp/ng-K4aXCl/angular-errors.log" for further details.
After updating the nodejs from version 10 to version 12.03.1, it work's fine on my machine.
I'm getting error when deploying react-boilerplate on heroku with feathers, nodejs, mongodb, react. I specified up to date versions in package.json, and tried building with both npm and yarn but both fail. I appreciate your help!
"engines": {
"npm": ">=6.4.1",
"node": ">=v8.12.0",
"yarn": ">=1.10.1"
},
trial 1:
install with npm. error: sh: 1: node-pre-gyp: not found
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
YARN_PRODUCTION=false
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): >=v8.12.0
engines.npm (package.json): >=6.4.1
Resolving node version >=v8.12.0...
Downloading and installing node 10.12.0...
Bootstrapping npm >=6.4.1 (replacing 6.4.1)...
npm >=6.4.1 installed
Resolving yarn version >=1.10.1...
Downloading and installing yarn (1.12.0)...
Installed yarn 1.12.0
> grpc#1.15.1 install /tmp/build_e7799f363b624e57eda6680a757c4fd4/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
sh: 1: node-pre-gyp: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! grpc#1.15.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the grpc#1.15.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
trial 2:
install with yarn. error: Error: spawn webpack ENOENT
NPM_CONFIG_LOGLEVEL=error
YARN_PRODUCTION=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): >=v8.12.0
engines.npm (package.json): >=6.4.1
engines.yarn (package.json): >=1.10.1
Resolving node version >=v8.12.0...
Downloading and installing node 10.12.0...
Bootstrapping npm >=6.4.1 (replacing 6.4.1)...
npm >=6.4.1 installed
Resolving yarn version >=1.10.1...
Downloading and installing yarn (1.12.0)...
Installed yarn 1.12.0
> seunghunlee-software#3.6.0 build /tmp/build_edb00e4a7279e6636f35f9ea79a9d0f8
> cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout
events.js:167
throw er; // Unhandled 'error' event
^
Error: spawn webpack ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
at onErrorNT (internal/child_process.js:407:16)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
//package.json
"dependencies": {
"#feathersjs/authentication": "^2.0.1",
"#feathersjs/authentication-client": "^1.0.6",
"#feathersjs/authentication-jwt": "^2.0.0",
"#feathersjs/authentication-local": "^1.0.2",
"#feathersjs/authentication-oauth2": "^1.2.2",
"#feathersjs/client": "^3.7.3",
"#feathersjs/configuration": "^1.0.1",
"#feathersjs/errors": "^3.2.0",
"#feathersjs/express": "^1.1.2",
"#feathersjs/feathers": "^3.2.3",
"#feathersjs/socketio": "^3.0.1",
"#feathersjs/socketio-client": "^1.1.4",
"#google-cloud/vision": "^0.19.0",
"Dante2": "0.5.0-rc5",
"antd": "^3.10.1",
"apiai": "^4.0.3",
"axios": "^0.18.0",
"babel-polyfill": "6.26.0",
"body-parser": "^1.18.3",
"chalk": "2.4.1",
"compression": "1.7.2",
"cors": "^2.8.4",
"cross-env": "5.2.0",
"disqus-react": "^1.0.5",
"dotenv": "^6.0.0",
"draft-js": "^0.10.5",
"draftjs-to-html": "^0.8.4",
"express": "4.16.3",
"faker": "^4.1.0",
"feathers-mongoose": "^6.1.4",
"feathers-sync": "^1.0.3",
"fontfaceobserver": "2.0.13",
"googleapis": "^32.0.0",
"helmet": "^3.9.0",
"heroku-ssl-redirect": "^0.0.4",
"history": "4.7.2",
"hoist-non-react-statics": "2.5.5",
"html-to-draftjs": "^1.4.0",
"immutability-helper": "2.4.0",
"immutable": "3.8.2",
"intl": "1.2.5",
"invariant": "2.2.4",
"ip": "1.1.5",
"lodash": "4.17.10",
"lqip.macro": "^0.1.5",
"minimist": "1.2.0",
"moment": "^2.22.2",
"moment-range": "^4.0.1",
"mongoose": "^5.2.13",
"passport-facebook": "^2.1.1",
"passport-facebook-token": "^3.3.0",
"passport-google-oauth2": "^0.1.6",
"passport-google-oauth20": "^1.0.0",
"passport-google-token": "^0.1.2",
"pica": "^4.1.1",
"prismjs": "^1.15.0",
"prop-types": "15.6.1",
"react": "16.4.1",
"react-burger-menu": "^2.5.4",
"react-camera": "^0.1.3",
"react-color": "^2.14.1",
"react-cookie-consent": "^1.9.0",
"react-datepicker": "^1.4.1",
"react-dnd": "^2.6.0",
"react-dnd-html5-backend": "^2.6.0",
"react-dom": "16.4.1",
"react-draft-wysiwyg": "^1.12.13",
"react-ga": "^2.5.3",
"react-helmet": "5.2.0",
"react-ideal-image": "^0.0.5",
"react-image-gallery": "^0.8.6",
"react-images": "^0.5.13",
"react-intl": "2.4.0",
"react-lazyload": "^2.3.0",
"react-loadable": "5.4.0",
"react-redux": "5.0.7",
"react-router-dom": "4.3.1",
"react-router-redux": "5.0.0-alpha.9",
"react-typist": "^2.0.4",
"react-vis": "^1.9.2",
"reactcss": "^1.2.3",
"redux": "4.0.0",
"redux-form": "^7.3.0",
"redux-form-antd": "^1.0.5",
"redux-immutable": "4.0.0",
"redux-persist": "^5.9.1",
"redux-saga": "0.16.0",
"redux-thunk": "^2.3.0",
"reselect": "3.0.1",
"sanitize.css": "4.1.0",
"serve-favicon": "^2.4.5",
"socket.io": "^2.0.4",
"socket.io-client": "^2.1.1",
"spotify-web-api-node": "^3.1.1",
"styled-components": "3.3.2",
"uuid": "^3.3.2",
"voucher-code-generator": "^1.1.1",
"warning": "4.0.1",
"web3": "^1.0.0-beta.36",
"whatwg-fetch": "2.0.4",
"winston": "^3.0.0"
},
"devDependencies": {
"add-asset-html-webpack-plugin": "2.1.3",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-eslint": "8.2.3",
"babel-loader": "7.1.4",
"babel-plugin-dynamic-import-node": "1.2.0",
"babel-plugin-import": "^1.10.0",
"babel-plugin-react-intl": "2.4.0",
"babel-plugin-react-transform": "3.0.0",
"babel-plugin-styled-components": "1.5.1",
"babel-plugin-transform-es2015-modules-commonjs": "6.26.2",
"babel-plugin-transform-react-constant-elements": "6.23.0",
"babel-plugin-transform-react-inline-elements": "6.22.0",
"babel-plugin-transform-react-jsx-source": "6.22.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.13",
"babel-preset-env": "1.7.0",
"babel-preset-react": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"circular-dependency-plugin": "5.0.2",
"coveralls": "3.0.1",
"css-loader": "0.28.11",
"enzyme": "3.3.0",
"enzyme-adapter-react-16": "1.1.1",
"enzyme-to-json": "3.3.4",
"eslint": "4.19.1",
"eslint-config-airbnb": "16.1.0",
"eslint-config-airbnb-base": "12.1.0",
"eslint-config-prettier": "2.9.0",
"eslint-import-resolver-webpack": "0.10.0",
"eslint-plugin-import": "2.12.0",
"eslint-plugin-jsx-a11y": "6.0.3",
"eslint-plugin-prettier": "2.6.0",
"eslint-plugin-react": "7.9.1",
"eslint-plugin-redux-saga": "0.9.0",
"eventsource-polyfill": "0.9.6",
"exports-loader": "0.7.0",
"feathers-memory": "^2.1.0",
"file-loader": "1.1.11",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"husky": "0.14.3",
"image-webpack-loader": "^4.4.0",
"imports-loader": "0.8.0",
"jest-cli": "23.1.0",
"jest-styled-components": "5.0.1",
"lint-staged": "7.2.0",
"ngrok": "3.0.1",
"node-plop": "0.15.0",
"null-loader": "0.1.1",
"offline-plugin": "5.0.5",
"plop": "2.0.0",
"pre-commit": "1.2.2",
"prettier": "1.13.5",
"react-test-renderer": "16.4.1",
"rimraf": "2.6.2",
"shelljs": "0.8.2",
"style-loader": "0.21.0",
"stylelint": "9.3.0",
"stylelint-config-recommended": "2.1.0",
"stylelint-config-styled-components": "0.1.1",
"stylelint-processor-styled-components": "1.3.1",
"svg-url-loader": "2.3.2",
"url-loader": "1.0.1",
"webpack": "4.12.0",
"webpack-cli": "3.0.8",
"webpack-dev-middleware": "3.1.3",
"webpack-hot-middleware": "2.22.2",
"webpack-pwa-manifest": "3.6.2"
}
The problem is that the bcrypt library is not installed.
Instead of bcrypt you can install and use bcryptjs which is the same library implemented in plain JavaScript instead of C++.
i had this error........
sh: 1: node-pre-gyp: not found
when deploying my app to heroku.
To solve it, i added "node-pre-gyp": "^0.16.0", as the first dependency in package.json so that heroku installs it before any other library that will need it.
Any version of node-pre-gyp will work just fine.
When I run npm install inside my project folder, it gets terminated.
Errors show up in terminal (MacOS X):
npm ERR! install Couldn't read dependencies
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! Invalid version: "0.1.2.0"
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Orion/NodeWorks/WebDev/npm-debug.log
Here i have attached the npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
2 info using npm#2.15.1
3 info using node#v4.4.3
4 verbose readDependencies loading dependencies from /Users/Orion/NodeWorks/WebDev/package.json
5 error install Couldn't read dependencies
6 verbose stack Error: Invalid version: "0.1.2.0"
6 verbose stack at Object.module.exports.fixVersionField (/usr/local/lib/node_modules/npm/node_modules/normalize-package-data/lib/fixer.js:191:13)
6 verbose stack at /usr/local/lib/node_modules/npm/node_modules/normalize-package-data/lib/normalize.js:32:38
6 verbose stack at Array.forEach (native)
6 verbose stack at normalize (/usr/local/lib/node_modules/npm/node_modules/normalize-package-data/lib/normalize.js:31:15)
6 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:338:5)
6 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:113:5)
6 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:232:12
6 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
6 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
7 verbose cwd /Users/Orion/NodeWorks/WebDev
8 error Darwin 15.4.0
9 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
10 error node v4.4.3
11 error npm v2.15.1
12 error Invalid version: "0.1.2.0"
13 error If you need help, you may report this error at:
13 error <https://github.com/npm/npm/issues>
14 verbose exit [ 1, true ]
And here is my package.json:
{
"name": "*****",
"version": "0.1.2.0",
"private": true,
"description": "Packages for the web site ****.com",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "*****",
"license": "ISC",
"dependencies": {
"async": "^2.0.0-rc.3",
"bcryptjs": "^2.3.0",
"body-parser": "^1.15.0",
"cookie-parser": "^1.4.1",
"debug": "^2.2.0",
"del": "^2.2.0",
"elasticsearch": "^11.0.1",
"emailjs": "^1.0.4",
"express": "^4.13.4",
"express-session": "^1.13.0",
"gulp-coffee": "^2.3.2",
"gulp-concat": "^2.6.0",
"gulp-imagemin": "^2.4.0",
"gulp-sourcemaps": "^2.0.0-alpha",
"gulp-uglify": "^1.5.3",
"gulp-util": "^3.0.7",
"html-metadata": "^1.4.1",
"jade": "^1.11.0",
"knex": "^0.10.0",
"lodash": "^4.11.1",
"mongoosastic": "^4.0.2",
"mongoose": "^4.4.13",
"morgan": "^1.6.1",
"nodemailer": "^2.3.2",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"python-shell": "^0.4.0",
"q": "^1.4.1",
"request": "^2.69.0",
"serve-favicon": "^2.3.0",
"speakingurl": "^9.0.0",
"urlencode": "^1.1.0"
},
"devDependencies": {
"chai": "^3.5.0",
"grunt": "^1.0.1",
"gulp": "^3.9.1",
"gulp-jade": "^1.1.0",
"mocha": "^2.4.5"
}
}
I am using npm version 2.15.1 and node version v4.4.3.
You have an invalid version of your app.
The version should contain of 3 parts, whereas you have 4:
"version": "0.1.2.0"
Update the version to this and it should work fine:
"version": "0.1.2"
NPM is using semver which has 3 (not four) parts in the version (major, minor and patch) divided by dot sign.
I've been following the instructions here: http://code.tutsplus.com/tutorials/setting-up-continuous-integration-continuous-deployment-with-jenkins--cms-21511
When I create the production droplet all goes well. The new node.js works great and the npm install works.
When, however, I create the jenkins droplet, jenkins comes up fine, but the auto-install of the git package stops when it tries to find bower.
My package.json says:
{
"name": "mean",
"description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js",
"version": "0.0.1",
"engines": {
"node": "0.10.x",
"npm": "1.4.x"
},
"scripts": {
"start": "grunt",
"test": "grunt test",
"postinstall": "bower install --config.interactive=false"
},
"dependencies": {
"express": "~4.10.1",
"express-session": "~1.9.1",
"body-parser": "~1.9.0",
"cookie-parser": "~1.3.2",
"compression": "~1.2.0",
"method-override": "~2.3.0",
"morgan": "~1.4.1",
"connect-mongo": "~0.4.1",
"connect-flash": "~0.1.1",
"helmet": "~0.5.0",
"consolidate": "~0.10.0",
"swig": "~1.4.1",
"mongoose": "~3.8.8",
"passport": "~0.2.0",
"passport-local": "~1.0.0",
"passport-facebook": "~1.0.2",
"passport-twitter": "~1.0.2",
"passport-linkedin": "~0.1.3",
"passport-google-oauth": "~0.1.5",
"passport-github": "~0.1.5",
"lodash": "~2.4.1",
"forever": "~0.11.0",
"bower": "~1.3.8",
"grunt-cli": "~0.1.13",
"glob": "~4.0.5",
"async": "~0.9.0",
"nodemailer": "~1.3.0",
"chalk": "~0.5",
"ejs": "~1.0.0",
"jquery": "~2.1.0",
"multer": "~0.1.7",
"busboy": "~0.2.9",
"connect-busboy":"~0.0.2",
"fs-extra":"~0.16.3"
},
"devDependencies": {
"grunt-concurrent": "~1.0.0",
"grunt-contrib-csslint": "^0.3.1",
"grunt-contrib-cssmin": "~0.10.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-env": "~0.4.1",
"grunt-karma": "~0.9.0",
"grunt-mocha-test": "~0.12.1",
"grunt-ng-annotate": "~0.4.0",
"grunt-node-inspector": "~0.1.3",
"grunt-nodemon": "~0.3.0",
"karma": "~0.12.0",
"karma-chrome-launcher": "~0.1.2",
"karma-coverage": "~0.2.0",
"karma-firefox-launcher": "~0.1.3",
"karma-jasmine": "~0.2.1",
"karma-phantomjs-launcher": "~0.1.2",
"karma-requirejs": "^0.2.2",
"load-grunt-tasks": "~1.0.0",
"requirejs": "^2.1.15",
"should": "~4.1.0",
"supertest": "~0.14.0"
}
}
And I get the error in the jenkins console log:
+ npm install
npm WARN package.json mean#0.0.1 No repository field.
> mean#0.0.1 postinstall /var/lib/jenkins/jobs/Paygevity/workspace
> bower install --config.interactive=false
sh: 1: bower: not found
npm ERR! Linux 3.13.0-43-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! mean#0.0.1 postinstall: `bower install --config.interactive=false`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the mean#0.0.1 postinstall script 'bower install --config.interactive=false'.
npm ERR! This is most likely a problem with the mean package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install --config.interactive=false
npm ERR! You can get their info via:
npm ERR! npm owner ls mean
npm ERR! There is likely additional logging output above.