1

I've got a problem with npm on my pc.

node -v v10.16.0

npm -v 6.9.0

npm install returns this:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules\chokidar\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EBUSY: resource busy or locked, rename 'I:\js\promo\node_modules\.staging\fsevents-58f790e8\node_modules\aproba' -> 'I:\js\promo\node_modules\.staging\aproba-1d87c747'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EBUSY: resource busy or locked, rename 'I:\js\promo\node_modules\.staging\fsevents-14a87c54\node_modules\aproba' -> 'I:\js\promo\node_modules\.staging\aproba-22d120c7'

npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ivan\AppData\Roaming\npm-cache\_logs\2019-07-11T15_46_19_576Z-debug.log

package.json:

package.json
{
  "name": "promo_front",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "start": "env-cmd dev.env react-app-rewired start",
    "prod": "env-cmd prod.env react-app-rewired build",
    "build": "env-cmd prod.env react-app-rewired build",
    "dev": "env-cmd dev.env react-app-rewired build",
    "test": "env-cmd prod.env react-app-rewired test",
    "prettier": "prettier \"./src/**/*.{ts,tsx}\" --write",
    "lint": "tslint \"./src/**/*.{ts,tsx}\" --fix"
  },
  "husky": {
    "hooks": {
      "pre-commit": "npm run prettier"
    }
  },
  "dependencies": {
    "@types/jest": "^24.0.12",
    "@types/lodash-es": "^4.17.3",
    "@types/node": "^11.13.8",
    "@types/react": "^16.8.15",
    "@types/react-dom": "^16.8.4",
    "@types/react-jsonschema-form": "^1.3.2",
    "@types/react-router-dom": "^4.3.2",
    "antd": "^3.16.6",
    "axios": "^0.18.0",
    "babel-plugin-import": "^1.11.0",
    "customize-cra": "^0.2.12",
    "history": "^4.9.0",
    "less": "^3.9.0",
    "less-loader": "^5.0.0",
    "lodash-es": "^4.17.11",
    "mobx": "^5.9.4",
    "mobx-react": "^5.4.3",
    "mobx-react-lite": "^1.3.1",
    "mobx-react-router": "^4.0.7",
    "moment": "^2.24.0",
    "prettier": "^1.17.0",
    "react": "^16.8.2",
    "react-app-rewired": "^2.1.3",
    "react-dom": "^16.8.2",
    "react-hot-loader": "^4.8.4",
    "react-jsonschema-form": "^1.5.0",
    "react-router": "^5.0.0",
    "react-router-dom": "^5.0.0",
    "react-scripts": "3.0.0",
    "typescript": "^3.4.5"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "env-cmd": "^8.0.2",
    "husky": "^2.2.0",
    "tslint": "^5.16.0",
    "tslint-react": "^4.0.0"
  }
}

I guess i should add error log, but it is 800kb of text

first lines is something like this

6008 silly decomposeActions finalize resolve-cwd@2.0.0

then

11814 silly install executeActions

11816 verbose correctMkdir C:\Users\Ivan\AppData\Roaming\npm-cache_locks correctMkdir not in flight; initializing

then something similar

end of file

15545 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules\chokidar\node_modules\fsevents):

15546 warn optional SKIPPING OPTIONAL DEPENDENCY: EBUSY: resource busy or locked, rename 'I:\js\promo\node_modules.staging\fsevents- 58f790e8\node_modules\aproba' -> 'I:\js\promo\node_modules.staging\aproba-1d87c747'

15547 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules\jest-haste-map\node_modules\fsevents):

15548 warn optional SKIPPING OPTIONAL DEPENDENCY: EBUSY: resource busy or locked, rename 'I:\js\promo\node_modules.staging\fsevents- 14a87c54\node_modules\aproba' -> 'I:\js\promo\node_modules.staging\aproba-22d120c7'

15549 verbose stack RangeError: Maximum call stack size exceeded

15549 verbose stack at RegExp.test ()

15549 verbose stack at isDepOptional (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:423:45)

15549 verbose stack at failedDependency (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:432:9)

multiple rows of this: 15549 verbose stack at failedDependency (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:448:9)

15550 verbose cwd I:\js\promo

15551 verbose Windows_NT 10.0.14393

15552 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"

15553 verbose node v10.16.0

15554 verbose npm v6.9.0

15555 error Maximum call stack size exceeded

15556 verbose exit [ 1, true ]

actually I am sorry, I cant provide you log file in normal type, advice me something about it.

  1. delete node_modules and npm install again - does not work
  2. npm rebuild -g - does not work
  3. npm cache clean --force - does not work
  4. Delete all the content of the npm dependencies, and then npm install - does not work

so refer to another question does not work, but probably I am doing something wrong

  1. ok, I've done

npm uninstall npm cache clean --force npm install

and it WORKED

probably, some of steps I've wrote before worked, but I didnt mind it.

thank you

Ivan Burilichev
  • 181
  • 1
  • 7
  • Pretty much all of your `dependencies` should be in `devDependencies`. You don't need typescript, @types/*, babel or some of the other things in production. You're making your bundle very, very fat. – mwilson Jul 11 '19 at 16:21

0 Answers0