node.js jenkins npm install fails - node.js

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.

Related

React-native: Error with npm install; dependency issues

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",

NPM Error when adding package as a peer dependency

I've 2 projects, where I use the same global components, and I decided to create a private npm package, when I moved my dependencies to peer dependencies it gives errors. I want to install packages without error, and when I try to install the npm package in my projects, I want to install it without npm i --legacy-peer-deps or npm i --force. My package.json file:
"dependencies": {
"react-helmet": "^6.1.0"
},
"devDependencies": {
"#babel/preset-env": "^7.14.1",
"#babel/preset-react": "^7.13.13",
"#rollup/plugin-babel": "^5.3.0",
"#rollup/plugin-commonjs": "^19.0.0",
"#rollup/plugin-node-resolve": "^13.0.0",
"#semantic-release/commit-analyzer": "8.0.1",
"#semantic-release/git": "9.0.0",
"#semantic-release/github": "7.2.3",
"#semantic-release/npm": "7.1.3",
"#semantic-release/release-notes-generator": "9.0.2",
"#storybook/addon-actions": "6.2.9",
"#storybook/addon-essentials": "6.2.9",
"#storybook/addon-info": "5.3.21",
"#storybook/addon-links": "6.2.9",
"#storybook/addons": "6.2.9",
"#storybook/react": "6.2.9",
"#testing-library/jest-dom": "5.11.9",
"#testing-library/react": "11.1.0",
"#testing-library/user-event": "12.6.3",
"#types/humps": "2.0.0",
"#types/jest": "26.0.15",
"#types/react-dom": "16.9.8",
"#types/react-helmet": "6.1.1",
"#types/react-router-dom": "5.1.7",
"#types/react-window": "1.8.2",
"#types/react-window-infinite-loader": "1.0.3",
"#typescript-eslint/eslint-plugin": "4.5.0",
"#typescript-eslint/parser": "4.5.0",
"eslint": "7.12.0",
"eslint-config-airbnb": "18.2.0",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-webpack": "0.13.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-import-helpers": "1.1.0",
"eslint-plugin-jest": "24.1.0",
"eslint-plugin-jsx-a11y": "6.4.0",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-hooks": "4.2.0",
"file-loader": "6.1.1",
"html-webpack-plugin": "4.5.0",
"jest": "26.6.1",
"prettier": "2.2.1",
"rollup": "^2.50.4",
"rollup-plugin-cleaner": "^1.0.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-svg": "^2.0.0",
"rollup-plugin-typescript2": "^0.30.0",
"semantic-release": "17.4.2",
"size-limit": "4.10.2",
"style-loader": "2.0.0",
"ts-jest": "26.5.6",
"typescript-transform-paths": "2.2.3"
},
"peerDependencies": {
"#date-io/date-fns": "1.3.13",
"#hookform/resolvers": "1.3.0",
"#material-ui/core": "4.11.0",
"#material-ui/icons": "4.11.2",
"#material-ui/lab": "4.0.0-alpha.57",
"#material-ui/pickers": "3.2.10",
"#size-limit/preset-small-lib": "4.10.2",
"clsx": "1.1.1",
"date-fns": "2.17.0",
"humps": "2.0.1",
"i18next": "19.8.7",
"keycloak-js": "^12.0.4",
"memoize-one": "^5.1.1",
"notistack": "^1.0.6",
"react": ">=17.0.1",
"react-dom": "17.0.1",
"react-hook-form": "6.9.6",
"react-hotkeys-hook": "^3.2.1",
"react-i18next": "11.8.5",
"react-if": "^4.0.1",
"react-router": "5.2.0",
"react-router-dom": "5.2.0",
"react-virtualized-auto-sizer": "^1.0.4",
"react-window": "1.8.5",
"react-window-infinite-loader": "^1.0.7",
"yup": "0.29.3"
}
NPM ERROR:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: #picsart/pa-backoffice-shared#1.0.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! peer react#">=16.0.0" from the root project
npm ERR! peer react#">=16.3.0" from react-helmet#6.1.0
npm ERR! node_modules/react-helmet
npm ERR! react-helmet#"^6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0" from react-hook-form#6.9.6
npm ERR! node_modules/react-hook-form
npm ERR! peer react-hook-form#"6.9.6" from the root project
npm ERR! peer react-hook-form#">=6.6.0" from #hookform/resolvers#1.3.0
npm ERR! node_modules/#hookform/resolvers
npm ERR! peer #hookform/resolvers#"1.3.0" from the root project
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/tikopicsart/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tikopicsart/.npm/_logs/2021-06-02T07_25_09_846Z-debug.log
How can I resolve it without npm i --legacy-peer-deps or npm i --force.

Error while installing node modules in reactjs

Getting the below shown error I tried to install node modules using npm i command for my react js project
D:\Rev>npm i
> node-sass#4.12.0 install D:\Rev\node_modules\node-sass
> node scripts/install.js
Cached binary found at C:\Users\admin\AppData\Roaming\npm-cache\node-sass\4.12.0\win32-x64-64_binding.node
> node-sass#4.12.0 postinstall D:\Rev\node_modules\node-sass
> node scripts/build.js
Binary found at D:\Rev\node_modules\node-sass\vendor\win32-x64-64\binding.node
Testing binary
Binary is fine
> react-vertical-timeline-component#2.5.0 postinstall D:\Rev\node_modules\react-vertical-timeline-component
> node lib/post_install.js
> example-project#1.0.0 postinstall D:\Rev
> set NODE_ENV=production && npm run build-prod
> example-project#1.0.0 build-prod D:\Rev
> webpack --mode production --config webpack/webpack.production.config.js --progress --colors
D:\Rev\node_modules\webpack-cli\bin\config-yargs.js:89
describe: optionsSchema.definitions.output.properties.path.description,
^
TypeError: Cannot read property 'properties' of undefined
at module.exports (D:\Rev\node_modules\webpack-cli\bin\config-yargs.js:89:48)
at D:\Rev\node_modules\webpack-cli\bin\webpack.js:60:27
at Object.<anonymous> (D:\Rev\node_modules\webpack-cli\bin\webpack.js:515:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! example-project#1.0.0 build-prod: `webpack --mode production --config webpack/webpack.production.config.js --progress --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example-project#1.0.0 build-prod 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\admin\AppData\Roaming\npm-cache\_logs\2019-09-27T08_52_21_812Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! example-project#1.0.0 postinstall: `set NODE_ENV=production && npm run build-prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example-project#1.0.0 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! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2019-09-27T08_52_21_942Z-debug.log
The package.json is as follows:
{
"name": "example-project",
"version": "1.0.0",
"description": "",
"main": "bundle.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev-server": "set NODE_ENV=development && webpack-dev-server --mode development --config webpack/webpack.config.js --progress --colors",
"build": "set NODE_ENV=development && webpack --config webpack/webpack.production.config.js --progress --colors",
"build-prod": "webpack --mode production --config webpack/webpack.production.config.js --progress --colors",
"postinstall": "set NODE_ENV=production && npm run build-prod"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.4",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"css-loader": "^0.28.11",
"eslint": "^4.19.1",
"eslint-loader": "^2.0.0",
"eslint-plugin-react": "^7.8.2",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"node-sass": "^4.9.0",
"react-collapsible": "^2.2.0",
"sass-loader": "^7.0.1",
"style-loader": "^0.21.0",
"webpack": "^4.8.3",
"webpack-cli": "^2.1.5",
"webpack-dev-server": "^3.1.4",
"webpack-merge": "^4.1.2"
},
"dependencies": {
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"babel-preset-react": "^6.24.1",
"classnames": "^2.2.5",
"dnd-core": "^3.0.2",
"file-loader": "^1.1.11",
"file-system": "^2.2.2",
"foundation-sites": "^6.4.3",
"gatsby-plugin-glamor": "^1.6.13",
"glamor": "^2.20.40",
"history": "^4.7.2",
"jquery": "^3.3.1",
"lodash": "^4.17.10",
"moment": "^2.22.1",
"qs": "^6.5.2",
"raf": "^3.4.1",
"rc-tree": "^1.11.4",
"react": "^16.3.2",
"react-autocomplete": "^1.8.1",
"react-column-resizer": "^1.1.8",
"react-datepicker": "^1.5.0",
"react-dialog": "^1.0.2",
"react-dnd": "^3.0.2",
"react-dnd-html5-backend": "^2.6.0",
"react-dom": "^16.3.2",
"react-dropzone": "^4.2.9",
"react-html-table-to-excel": "^2.0.0",
"react-idle-timer": "^3.0.0",
"react-js-pagination": "^3.0.2",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-router-redux": "^5.0.0-alpha.9",
"react-simple-dropdown": "^3.2.0",
"react-sortable-hoc": "^0.8.4",
"react-toastify": "^4.0.1",
"react-tooltip": "^3.10.0",
"react-transition-group": "^2.3.1",
"react-vertical-timeline-component": "^2.0.6",
"react-widgets": "^4.2.6",
"redux": "^3.7.2",
"redux-form": "^7.3.0",
"redux-thunk": "^2.2.0",
"uglifyjs-webpack-plugin": "^1.2.5",
"universal-cookie": "^2.1.2",
"url-loader": "^1.0.1"
}
}
How can I solve this issue?
Can you try to remove totally local node_modules
Then call
npm cache verify
or
npm cache clean
https://docs.npmjs.com/cli/cache.html
Then try to npm i again

npm err! maximum call stack size exceeded

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.

npm dependency issue when installing... well, pretty much anything

Suddenly, this is happening:
$ npm install history
npm ERR! Linux 3.13.0-76-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "history"
npm ERR! node v4.4.0
npm ERR! npm v2.14.20
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package history#1.13.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-router#1.0.3 wants history#^1.17.0
...when I try to install, well, pretty much anything. I've tried to install react-bootstrap, got this error, and tried to upgrade history. I'm not sure what to do here.
I've tried npm i -S history#1.17.0 to no avail. Same error.
Here's my package.json:
"dependencies": {
"bootstrap-loader": "1.0.9",
"bootstrap-sass": "3.3.6",
"connect-history-api-fallback": "1.1.0",
"css-loader": "0.23.1",
"font-awesome": "4.5.0",
"font-awesome-webpack": "0.0.4",
"node-sass": "3.4.2",
"object-assign": "4.0.1",
"react": "0.14.7",
"react-dom": "0.14.7",
"react-redux": "4.4.0",
"react-router": "2.0.0",
"redux": "3.3.1",
"redux-api-middleware": "1.0.1",
"redux-thunk": "2.0.1",
"resolve-url-loader": "1.4.3",
"sass-loader": "3.2.0",
"style-loader": "0.13.0",
"url-loader": "0.5.7"
},
"devDependencies": {
"babel-cli": "6.5.1",
"babel-core": "6.5.1",
"babel-eslint": "5.0.0",
"babel-loader": "6.2.3",
"babel-plugin-react-display-name": "2.0.0",
"babel-plugin-react-transform": "2.0.0",
"babel-preset-es2015": "6.5.0",
"babel-preset-react": "6.5.0",
"babel-preset-stage-1": "6.5.0",
"browser-sync": "2.11.1",
"chai": "3.4.1",
"cheerio": "0.19.0",
"colors": "1.1.2",
"cross-env": "1.0.7",
"css-loader": "0.23.1",
"eslint": "2.2.0",
"eslint-loader": "1.3.0",
"eslint-plugin-react": "4.0.0",
"extract-text-webpack-plugin": "1.0.1",
"file-loader": "0.8.5",
"mocha": "2.3.4",
"node-sass": "3.4.2",
"parallelshell": "2.0.0",
"react-transform-catch-errors": "1.0.1",
"react-transform-hmr": "1.0.1",
"redbox-react": "1.2.0",
"rimraf": "2.5.0",
"sass-loader": "3.1.2",
"style-loader": "0.13.0",
"watch": "0.17.1",
"webpack": "1.12.11",
"webpack-dev-middleware": "1.4.0",
"webpack-hot-middleware": "2.6.0",
"yargs": "3.32.0"
},
Any help appreciated.
Looks like some versions had their wires crossed somehow. Ended up removing my node_modules directory rm -r node_modules and reinstalling npm install and that fixed it.

Resources