0

When I try to run npm run build the bash throw me this code:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! focus-mind-event@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the focus-mind-event@0.1.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!     C:\Users\dittl\AppData\Roaming\npm-cache\_logs\2021-02-10T02_10_16_900Z-debug.log

I already tried this solution

but it's not working for me, I already deleted two times the node_modules and package-lock.json two times and what I noticed was that a lot of items during the npm install show up as deprecated like this one:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

Can be this the problem? Because I don't see anything wrong in my package.json

{
  "homepage": ".",
  "name": "focus-mind-event",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.11.6",
    "@testing-library/react": "^11.2.0",
    "@testing-library/user-event": "^12.2.2",
    "axios": "^0.21.0",
    "bootstrap": "^4.5.3",
    "node-sass": "^4.14.1",
    "nodemailer": "^6.4.16",
    "react": "^17.0.1",
    "react-anchor-link-smooth-scroll": "^1.0.12",
    "react-bootstrap": "^1.4.0",
    "react-countdown": "^2.3.1",
    "react-dom": "^17.0.1",
    "react-reveal": "^1.2.2",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.0",
    "react-tooltip": "^4.2.10",
    "web-vitals": "^0.2.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

the log C:\Users\dittl\AppData\Roaming\npm-cache\_logs\2021-02-10T02_10_16_900Z-debug.log show me this:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\dittl\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using npm@6.14.9
3 info using node@v14.15.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle focus-mind-event@0.1.0~prebuild: focus-mind-event@0.1.0
6 info lifecycle focus-mind-event@0.1.0~build: focus-mind-event@0.1.0
7 verbose lifecycle focus-mind-event@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle focus-mind-event@0.1.0~build: PATH: C:\Users\dittl\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\dittl\Desktop\focus-mind-event\node_modules\.bin;C:\Users\dittl\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\cmd;C:\Python38\Scripts;C:\Python38;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\dittl\AppData\Local\Microsoft\WindowsApps;C:\Users\dittl\AppData\Local\hyper\app-3.0.2\resources\bin;C:\Program Files\heroku\bin;C:\Users\dittl\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\dittl\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle focus-mind-event@0.1.0~build: CWD: C:\Users\dittl\Desktop\focus-mind-event
10 silly lifecycle focus-mind-event@0.1.0~build: Args: [ '/d /s /c', 'react-scripts build' ]
11 silly lifecycle focus-mind-event@0.1.0~build: Returned: code: 1  signal: null
12 info lifecycle focus-mind-event@0.1.0~build: Failed to exec build script
13 verbose stack Error: focus-mind-event@0.1.0 build: `react-scripts build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\dittl\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\dittl\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1048:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid focus-mind-event@0.1.0
15 verbose cwd C:\Users\dittl\Desktop\focus-mind-event
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\dittl\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v14.15.1
19 verbose npm  v6.14.9
20 error code ELIFECYCLE
21 error errno 1
22 error focus-mind-event@0.1.0 build: `react-scripts build`
22 error Exit status 1
23 error Failed at the focus-mind-event@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 ]
Alan
  • 349
  • 3
  • 15
  • Check `C:\Users\dittl\AppData\Roaming\npm-cache\_logs\2021-02-10T02_10_16_900Z-debug.log` like the error says. – Adam Jenkins Feb 10 '21 at 02:31
  • You've got a problem in your cached node modules. Check out [this answer](https://stackoverflow.com/a/58675278/954940). The actual thing you should be searching for is this error: `unsafe-perm in lifecycle true` – Adam Jenkins Feb 10 '21 at 02:42
  • I tried but when I tried to run `rm -rf node_modules` throw me an error so I deleted `-rf` and pass. did all the rest, but the problem is still there – Alan Feb 10 '21 at 02:53

0 Answers0