Error on "npm install" - node.js

I received a node.js project and I can't execute npm install, when I try to do it, it gives me this error:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#5.6.0
3 info using node#v8.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle park-administrative-interface#0.1.1~prestart: park-administrative-interface#0.1.1
6 verbose lifecycle park-administrative-interface#0.1.1~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle park-administrative-interface#0.1.1~prestart: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\dba\Downloads\Park\park-administrative-interface\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Users\dba\.windows-build-tools\python27;C:\Users\dba\.windows-build-tools\python27\Scripts;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\PuTTY\;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby1.9.3\bin;C:\Users\dba\AppData\Roaming\npm
8 verbose lifecycle park-administrative-interface#0.1.1~prestart: CWD: C:\Users\dba\Downloads\Park\park-administrative-interface
9 silly lifecycle park-administrative-interface#0.1.1~prestart: Args: [ '/d /s /c', 'npm install' ]
10 silly lifecycle park-administrative-interface#0.1.1~prestart: Returned: code: 1 signal: null
11 info lifecycle park-administrative-interface#0.1.1~prestart: Failed to exec prestart script
12 verbose stack Error: park-administrative-interface#0.1.1 prestart: `npm install`
12 verbose stack Exit status 1
12 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
12 verbose stack at emitTwo (events.js:126:13)
12 verbose stack at EventEmitter.emit (events.js:214:7)
12 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
12 verbose stack at emitTwo (events.js:126:13)
12 verbose stack at ChildProcess.emit (events.js:214:7)
12 verbose stack at maybeClose (internal/child_process.js:925:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
13 verbose pkgid park-administrative-interface#0.1.1
14 verbose cwd C:\Users\dba\Downloads\Park\park-administrative-interface
15 verbose Windows_NT 6.1.7601
16 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
17 verbose node v8.10.0
18 verbose npm v5.6.0
19 error code ELIFECYCLE
20 error errno 1
21 error park-administrative-interface#0.1.1 prestart: `npm install`
21 error Exit status 1
22 error Failed at the park-administrative-interface#0.1.1 prestart script.
22 error This is probably not a problem with npm. There is likely additional logging output above.
23 verbose exit [ 1, true ]
I'm new with node.js and don't understand it very much. Thanks.
------------------------------------------------------------------------------
package.json content:
{
"author": "Claudinei Callegari",
"name": "park-administrative-interface",
"version": "0.1.1",
"private": true,
"contributors": [
{
"name": "Marcel Araujo",
"email": "admin#marcelaraujo.me"
}
],
"bugs": {
"url": ""
},
"license": "MIT",
"engines": {
"node": ">= 0.6.x"
},
"scripts": {
"postinstall": "bower install",
"prestart": "npm install",
"start": "./node_modules/http-server/bin/http-server build -a 0.0.0.0 -p 8000 -c-1",
"pretest": "npm install",
"test": "karma start karma.conf.js",
"test-single-run": "karma start karma.conf.js --single-run",
"protractor": "protractor e2e-tests/protractor.conf.js"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-bower-task": "^0.4.0",
"grunt-check-gems": "0.0.2",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-copy": "^0.6.0",
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-sass": "^0.8.1",
"grunt-contrib-uglify": "^0.6.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-html-minify": "^0.3.1",
"grunt-html2js": "^0.2.9",
"grunt-ng-annotate": "^0.4.0",
"grunt-nodemon": "^0.3.0",
"grunt-parallel": "^0.3.1",
"grunt-s3": "^0.2.0-alpha.3",
"grunt-shell": "^1.1.1",
"http-server": "^0.7.3",
"load-grunt-tasks": "^0.6.0",
"time-grunt": "^1.0.0"
}
}

Related

next.js with-mongodb build error. error on `next build`?

I am trying to build a next.js project with-mongodb on it but its not working and im not sure why. The log doesn't appear to be very helpful with that the issue is (as far as i can tell) and so im not sure how to fix it. here is a copy of the log;
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:\\Program Files\\nodejs\\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.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle with-mongodb#0.1.0~prebuild: with-mongodb#0.1.0
6 info lifecycle with-mongodb#0.1.0~build: with-mongodb#0.1.0
7 verbose lifecycle with-mongodb#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle with-mongodb#0.1.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\Creative\Programming\VS code\quote-db\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Oculus\Support\oculus-runtime;C:\Python39\Scripts\;C:\Python39\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\Program Files (x86)\Touch Portal\plugins\adb\platform-tools;C:\Program Files\Git\cmd;C:\Users\user_\AppData\Local\Microsoft\WindowsApps;C:\Users\user_\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\user_\AppData\Roaming\npm
9 verbose lifecycle with-mongodb#0.1.0~build: CWD: E:\Creative\Programming\VS code\quote-db
10 silly lifecycle with-mongodb#0.1.0~build: Args: [ '/d /s /c', 'next build' ]
11 silly lifecycle with-mongodb#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle with-mongodb#0.1.0~build: Failed to exec build script
13 verbose stack Error: with-mongodb#0.1.0 build: `next build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\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:\Program Files\nodejs\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 with-mongodb#0.1.0
15 verbose cwd E:\Creative\Programming\VS code\quote-db
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v14.15.3
19 verbose npm v6.14.9
20 error code ELIFECYCLE
21 error errno 1
22 error with-mongodb#0.1.0 build: `next build`
22 error Exit status 1
23 error Failed at the with-mongodb#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 ]
EDIT: here is my package.json file.
{
"name": "with-mongodb",
"version": "0.1.0",
"scripts": {
"debug": "cross-env NODE_OPTIONS='--inspect' next dev",
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"cross-env": "^7.0.3",
"mongodb": "^3.5.9",
"next": "latest",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^14.0.0",
"postcss-preset-env": "^6.7.0",
"precss": "^4.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"sass": "^1.32.8",
"swr": "^0.4.2",
"tailwindcss": "^2.0.3"
},
"license": "MIT"
}
Today I tried again and recieved a proper error message.
ModuleNotFoundError: Module not found: Error: Can't resolve '../styles/main.module.scss' in 'E:\Creative\Programming\VS code\quote-db\pages'
I'm not sure what changed, but this is now solved. Presumably restarting my PC had something to do with it?

Getting Webpack errors

So I am using webpack for a personal website. I followed a number of guides but none are working so far.
Here is my log:
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.14.8
3 info using node#v12.13.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle my-webpack-project#1.0.0~prebuild: my-webpack-project#1.0.0
6 info lifecycle my-webpack-project#1.0.0~build: my-webpack-project#1.0.0
7 verbose lifecycle my-webpack-project#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle my-webpack-project#1.0.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/santiagogutierrez/Documents/PersonalProjects/Personal Website/Portafolio/node_modules/.bin:/usr/local/opt/libxml2/bin:/usr/local/opt/libxml2/bin:/usr/local/opt/libressl/bin:/usr/local/opt/openssl/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/openssl/bin:/usr/local/opt/libxml2/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/libxml2/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/openssl/bin:/usr/local/opt/openssl/bin:/usr/local/opt/ncurses/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/libxml2/bin:/Users/santiagogutierrez/flutter/bin:/usr/local/opt/openssl/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/usr/local/go/bin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/Users/santiagogutierrez/.fzf/bin:/Users/santiagogutierrez/Library/Python/3.7/bin
9 verbose lifecycle my-webpack-project#1.0.0~build: CWD: /Users/santiagogutierrez/Documents/PersonalProjects/Personal Website/Portafolio
10 silly lifecycle my-webpack-project#1.0.0~build: Args: [ '-c', 'webpack --config webpack.config.js' ]
11 silly lifecycle my-webpack-project#1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle my-webpack-project#1.0.0~build: Failed to exec build script
13 verbose stack Error: my-webpack-project#1.0.0 build: `webpack --config webpack.config.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:210:5)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:210:5)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid my-webpack-project#1.0.0
15 verbose cwd /Users/santiagogutierrez/Documents/PersonalProjects/Personal Website/Portafolio
16 verbose Darwin 20.1.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v12.13.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error my-webpack-project#1.0.0 build: `webpack --config webpack.config.js`
22 error Exit status 1
23 error Failed at the my-webpack-project#1.0.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 ]
Here is my config file:
const path = require("path");
const HTMLWebPackPlugin = require("html-webpack-plugin");
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry:{
main:"./src/index.js"
},
output:{
path:path.resolve(__dirname,'./dist/'),
filename:'bundle.js'
},
module:{
rules:[
{
test:/\.html$/,
use:[
{
loader: "html-loader",
options:{
minimize:true
}
}
]
},
{
test: /\.css$/,
loader: 'css-loader'
}
]
},
plugins:[
new HTMLWebPackPlugin({
template:"./src/index.html",
source:"./index.html"
}),
]
}
Any help is appreciated.
My index.js is empty except for a console.log statement.
I am not sure what these "child compilation errors" are.
EDIT: I included the wrong log output.
So I figured out the problem. I was using an incompatible version of webpack-dev-server and webpack.
Here is my package file.
"devDependencies": {
"babel-loader": "^8.1.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"css-loader": "^4.3.0",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^6.1.1",
"html-loader": "^1.3.2",
"html-plugin": "^0.1.0",
"html-webpack-plugin": "^4.5.0",
"mini-css-extract-plugin": "^1.0.0",
"multi-loader": "^0.1.0",
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^4.2.3",
"webpack": "^5.1.2",
"webpack-cli": "^3.3.4",
"webpack-dev-server": "^3.5.1"
},
"scripts": {
"deploy": "gh-pages -d dist",
"build": "webpack --mode development",
"start": "webpack-dev-server --mode development --open"
},

node ./bin/www error elifecycle - what's wrong with this error log?

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm#6.14.6
3 info using node#v14.6.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle shopping-cart#0.0.0~prestart: shopping-cart#0.0.0
6 info lifecycle shopping-cart#0.0.0~start: shopping-cart#0.0.0
7 verbose lifecycle shopping-cart#0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle shopping-cart#0.0.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/rbalabarcon/shopping-cart/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
9 verbose lifecycle shopping-cart#0.0.0~start: CWD: /Users/rbalabarcon/shopping-cart
10 silly lifecycle shopping-cart#0.0.0~start: Args: [ '-c', 'node ./bin/www' ]
11 silly lifecycle shopping-cart#0.0.0~start: Returned: code: 1 signal: null
12 info lifecycle shopping-cart#0.0.0~start: Failed to exec start script
13 verbose stack Error: shopping-cart#0.0.0 start: `node ./bin/www`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1051:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid shopping-cart#0.0.0
15 verbose cwd /Users/rbalabarcon/shopping-cart
16 verbose Darwin 19.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v14.6.0
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 1
22 error shopping-cart#0.0.0 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the shopping-cart#0.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Package.json code below:
{
"name": "shopping-cart",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"connect-flash": "^0.1.1",
"cookie-parser": "~1.4.4",
"csurf": "^1.11.0",
"debug": "~2.6.9",
"express": "^4.16.4",
"express-handlebars": "^5.1.0",
"express-session": "^1.17.1",
"express-validator": "^6.6.0",
"hbs": "^4.1.1",
"http-errors": "~1.6.3",
"mongodb": "^3.5.9",
"morgan": "~1.9.1",
"passport": "^0.4.1",
"passport-local": "^1.0.0"
},

npm run build Reactjs errno1

Problem description
I have a react project, the project runs well with the command 'npm start'. But in executing the command 'npm run build', I get this error:
verbose node v12.16.3
verbose npm v6.14.4
error code ELIFECYCLE
error errno 1
error demo1#6.1.5 build: `react-scripts build`
error Exit status 1
error Failed at the demo1#6.1.5 build script.
error This is probably not a problem with npm. There is likely additional logging output above.
This is my Package.json :
{
"name": "demo1",
"version": "6.1.5",
"private": true,
"homepage": ".",
"scripts": {
"serve": "cp-cli build _site/metronic/preview/react && serve",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint src",
"format": "prettier --write \"src/**/*.{js,css,scss,html}\"",
"rtl": "webpack"
},
"eslintConfig": {
"extends": "react-app"
}
},
"dependencies": {
"#date-io/date-fns": "^1.3.11",
"#formatjs/intl-pluralrules": "^1.3.5",
"#material-ui/core": "^4.9.9",
"#material-ui/lab": "^4.0.0-alpha.33",
"#material-ui/styles": "^4.6.0",
"#tanem/svg-injector": "^8.0.35",
"array-unique": "^0.3.2",
"bootstrap": "^4.4.1",
"cp-cli": "^2.0.0",
"dentist": "^1.0.3",
"fg-loadcss": "^2.1.0",
"formik": "^2.0.6",
"jss-rtl": "^0.3.0",
"lodash": "^4.17.15",
"object-path": "^0.11.4",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-bootstrap": "1.0.0-beta.16",
"react-dom": "^16.12.0",
"redux": "^4.0.4",
"redux-persist": "^6.0.0",
"redux-saga": "^1.1.3"
.
.
}
}
"devDependencies": {
"#ionic/cli-plugin-proxy": "1.5.8",
"copyfiles": "^2.1.1",
"node-sass": "^4.13.0",
"prettier": "^1.19.1",
"serve": "^11.2.0",
"webpack-cli": "^3.3.10",
"webpack-messages": "^2.0.4",
"webpack-rtl-plugin": "^2.0.0"
}
Additional info
I have tried solutions like: clean and delete node_modules and then install npm.But I'm still wrong.
Full error description in log
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:\\..\\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.4
3 info using node#v12.16.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle demo1#6.1.5~prebuild: demo1#6.1.5
6 info lifecycle demo1#6.1.5~build: demo1#6.1.5
7 verbose lifecycle demo1#6.1.5~build: unsafe-perm in lifecycle true
8 verbose lifecycle demo1#6.1.5~build: PATH: C:\..\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;G:\EAMS\EAMS _FINAL\EAMS.Web.Portal\ClientApp\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\dotnet\;C:\Program Files\nodejs\;C:\..\AppData\Local\Microsoft\WindowsApps;;C:\Users\960145\AppData\Local\Programs\Microsoft VS Code\bin;C:\..\.dotnet\tools;C:\..\AppData\Roaming\npm
9 verbose lifecycle demo1#6.1.5~build: CWD: G:\EAMS\EAMS _FINAL\EAMS.Web.Portal\ClientApp
10 silly lifecycle demo1#6.1.5~build: Args: [ '/d /s /c', 'react-scripts build' ]
11 silly lifecycle demo1#6.1.5~build: Returned: code: 1 signal: null
12 info lifecycle demo1#6.1.5~build: Failed to exec build script
13 verbose stack Error: demo1#6.1.5 build: `react-scripts build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\960145\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (C:\..\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid demo1#6.1.5
15 verbose cwd G:\..\ClientApp
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\..\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v12.16.3
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error demo1#6.1.5 build: `react-scripts build`
22 error Exit status 1
23 error Failed at the demo1#6.1.5 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Try this:
npm cache clean --force
delete node_modules (manually)
npm install
npm run rtl
npm start

npm run build elifecycle

I am new to react and i want to create production build out of my code. But when i run 'npm rub build' it gives me this error in .log file
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/9.11.1/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#5.6.0
3 info using node#v9.11.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle jenna-web-frontend#0.1.0~prebuild:
jenna-webfrontend#0.1.0
6 info lifecycle jenna-web-frontend#0.1.0~build:
jenna-web-frontend#0.1.0
7 verbose lifecycle jenna-web-frontend#0.1.0~build: unsafe-perm in
lifecycle true
8 verbose lifecycle jenna-web-frontend#0.1.0~build: PATH:
/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/markopetricic/Documents/Projects/staging-jenna-web-front/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle jenna-web-frontend#0.1.0~build: CWD:
/Users/markopetricic/Documents/Projects/staging-jenna-web-front
10 silly lifecycle jenna-web-frontend#0.1.0~build: Args: [ '-c',
'react-scripts build' ]
11 silly lifecycle jenna-web-frontend#0.1.0~build: Returned: code: 1
signal: null
12 info lifecycle jenna-web-frontend#0.1.0~build: Failed to exec build
script
13 verbose stack Error: jenna-web-frontend#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:285:16)
13 verbose stack at EventEmitter.emit (events.js:180: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:180:13)
13 verbose stack at maybeClose (internal/child_process.js:936:16)
13 verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:220:5)
14 verbose pkgid jenna-web-frontend#0.1.0
15 verbose cwd
/Users/markopetricic/Documents/Projects/staging-jenna-web-front
16 verbose Darwin 17.3.0
17 verbose argv "/usr/local/Cellar/node/9.11.1/bin/node"
"/usr/local/bin/npm" "run" "build"
18 verbose node v9.11.1
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error jenna-web-frontend#0.1.0 build: react-scripts build
22 error Exit status 1
23 error Failed at the jenna-web-frontend#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 ]
this is package.json
{
"name": "jenna-web-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"cookieconsent": "^3.0.6",
"jquery": "^3.3.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-fade-in": "^0.1.5",
"react-router-dom": "^4.2.2",
"react-s3": "^1.2.4",
"react-s3-uploader": "^4.8.0",
"react-scripts": "1.1.1",
"react-stay-scrolled": "^2.1.1",
"sfcookies": "^1.0.2",
"socket.io-client": "^2.1.0"
},
"scripts": {
"start": "set PORT=3001 && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
do you have any idea why this happened?

Resources