Angular 2 : transpilation and start cmds failed - javascript

I'm new with Angular 2 and I have some errors while launching a basic app. I just create a new component and boostrap it. Nothing more.
Here is my package.json :
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"typings": "typings",
"postinstall": "typings install"
},
"license": "ISC",
"dependencies": {
"#ngrx/store": "^1.3.3",
"angular2": "2.0.0-beta.9",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"systemjs": "0.19.24",
"zone.js": "0.5.15"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.1.0",
"typescript": "^1.8.7",
"typings": "^0.7.5"
}
}
I have the latests versions of node & npm. I also installed globally the devDependencies.
My error log when I tried to npm run tsc:
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 'run',
1 verbose cli 'tsc' ]
2 info using npm#3.7.3
3 info using node#v5.8.0
4 verbose run-script [ 'pretsc', 'tsc', 'posttsc' ]
5 info lifecycle angular2-quickstart#1.0.0~pretsc: angular2-quickstart#1.0.0
6 silly lifecycle angular2-quickstart#1.0.0~pretsc: no script for pretsc, continuing
7 info lifecycle angular2-quickstart#1.0.0~tsc: angular2-quickstart#1.0.0
8 verbose lifecycle angular2-quickstart#1.0.0~tsc: unsafe-perm in lifecycle true
9 verbose lifecycle angular2-quickstart#1.0.0~tsc: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\__\mdev\node_modules\.bin;C:\Program Files\nodejs;C:\cmder\bin;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\share\vim\vim74;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Ruby22-x64\bin;C:\Program Files (x86)\OpenSSH\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\nodejs\;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;C:\Users\cflodrops\Downloads\windows-7.0.0\windrush;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files\Oracle\VirtualBox;C:\Program Files\Git\bin;C:\MinGW\bin;C:\wamp\bin\mysql\mysql5.6.17\bin;C:\Users\cflodrops\AppData\Local\atom\bin;C:\ProgramData\Drush\;C:\Program Files (x86)\Drush\GnuWin32\bin;C:\Program Files (x86)\Drush\Php;C:\Program Files (x86)\Drush\cwRsync\bin;C:\Program Files (x86)\Microsoft VS Code\bin;\\sdossier.groupe.zzroot.com\dossiers$\cflodrops\AppData\npm;C:\cmder
10 verbose lifecycle angular2-quickstart#1.0.0~tsc: CWD: D:\__\mdev
11 silly lifecycle angular2-quickstart#1.0.0~tsc: Args: [ '/d /s /c', 'tsc' ]
12 silly lifecycle angular2-quickstart#1.0.0~tsc: Returned: code: 2 signal: null
13 info lifecycle angular2-quickstart#1.0.0~tsc: Failed to exec tsc script
14 verbose stack Error: angular2-quickstart#1.0.0 tsc: `tsc`
14 verbose stack Exit status 2
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid angular2-quickstart#1.0.0
16 verbose cwd D:\__\mdev
17 error Windows_NT 6.1.7601
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "tsc"
19 error node v5.8.0
20 error npm v3.7.3
21 error code ELIFECYCLE
22 error angular2-quickstart#1.0.0 tsc: `tsc`
22 error Exit status 2
23 error Failed at the angular2-quickstart#1.0.0 tsc script 'tsc'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the angular2-quickstart package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error tsc
23 error You can get information on how to open an issue for this project with:
23 error npm bugs angular2-quickstart
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls angular2-quickstart
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
And when I execute npm start:
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 'run',
1 verbose cli 'lite' ]
2 info using npm#3.7.3
3 info using node#v5.8.0
4 verbose run-script [ 'prelite', 'lite', 'postlite' ]
5 info lifecycle angular2-quickstart#1.0.0~prelite: angular2-quickstart#1.0.0
6 silly lifecycle angular2-quickstart#1.0.0~prelite: no script for prelite, continuing
7 info lifecycle angular2-quickstart#1.0.0~lite: angular2-quickstart#1.0.0
8 verbose lifecycle angular2-quickstart#1.0.0~lite: unsafe-perm in lifecycle true
9 verbose lifecycle angular2-quickstart#1.0.0~lite: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\__\mdev\node_modules\.bin;C:\Program Files\nodejs;C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\__\mdev\node_modules\.bin;C:\Program Files\nodejs;C:\cmder\bin;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\share\vim\vim74;C:\cmder\vendor\conemu-maximus5;C:\cmder\vendor\conemu-maximus5\ConEmu;C:\Ruby22-x64\bin;C:\Program Files (x86)\OpenSSH\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\nodejs\;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;C:\Users\cflodrops\Downloads\windows-7.0.0\windrush;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files\Oracle\VirtualBox;C:\Program Files\Git\bin;C:\MinGW\bin;C:\wamp\bin\mysql\mysql5.6.17\bin;C:\Users\cflodrops\AppData\Local\atom\bin;C:\ProgramData\Drush\;C:\Program Files (x86)\Drush\GnuWin32\bin;C:\Program Files (x86)\Drush\Php;C:\Program Files (x86)\Drush\cwRsync\bin;C:\Program Files (x86)\Microsoft VS Code\bin;\\sdossier.groupe.zzroot.com\dossiers$\cflodrops\AppData\npm;C:\cmder
10 verbose lifecycle angular2-quickstart#1.0.0~lite: CWD: D:\__\mdev
11 silly lifecycle angular2-quickstart#1.0.0~lite: Args: [ '/d /s /c', 'lite-server' ]
12 silly lifecycle angular2-quickstart#1.0.0~lite: Returned: code: 1 signal: null
13 info lifecycle angular2-quickstart#1.0.0~lite: Failed to exec lite script
14 verbose stack Error: angular2-quickstart#1.0.0 lite: `lite-server`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid angular2-quickstart#1.0.0
16 verbose cwd D:\__\mdev
17 error Windows_NT 6.1.7601
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "lite"
19 error node v5.8.0
20 error npm v3.7.3
21 error code ELIFECYCLE
22 error angular2-quickstart#1.0.0 lite: `lite-server`
22 error Exit status 1
23 error Failed at the angular2-quickstart#1.0.0 lite script 'lite-server'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the angular2-quickstart package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error lite-server
23 error You can get information on how to open an issue for this project with:
23 error npm bugs angular2-quickstart
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls angular2-quickstart
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Okay so the issue comes from lite-server. I've decided to install http-server and change my package.json like that :
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "concurrently \"npm run tsc:w\" \"npm run http\" ",
"tsc": "tsc -p .",
"tsc:w": "tsc -w -p .",
"lite": "nano-server",
"http": "http-server -p 3000 -a 127.0.0.1 -o",
"typings": "typings",
"postinstall": "typings install"
},
"license": "ISC",
"dependencies": {
"#ngrx/store": "^1.3.3",
"angular2": "2.0.0-beta.9",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"systemjs": "0.19.24",
"zone.js": "0.5.15"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.1.0",
"http-server": "^0.9.0",
"typescript": "^1.8.7",
"typings": "^0.7.5"
}
}
And it works. Thanks for your help !

Related

npm run start, Failed at the start script

This is my first time using nodejs, I am getting the following error while running npm run start command. Is there a version compatibility issue between node and npm? I can see that the end lines suggesting this is not an issue with npm.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/iamuser/.nvm/versions/node/v14.17.6/bin/node',
1 verbose cli '/home/iamuser/.nvm/versions/node/v14.17.6/bin/npm',
1 verbose cli 'run',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.14.15
3 info using node#v14.17.6
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle test-api#1.0.0~prestart: test-api#1.0.0
6 info lifecycle test-api#1.0.0~start: test-api#1.0.0
7 verbose lifecycle test-api#1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle test-api#1.0.0~start: PATH: /home/iamuser/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/iamuser/Documents/JS/rapid_api/test-api/node_modules/.bin:/home/iamuser/.nvm/versions/node/v14.17.6/bin:/home/iamuser/anaconda3/bin:/home/iamuser/anaconda3/condabin:/home/iamuser/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle test-api#1.0.0~start: CWD: /home/iamuser/Documents/JS/rapid_api/test-api
10 silly lifecycle test-api#1.0.0~start: Args: [ '-c', 'nodemon index.js' ]
11 info lifecycle test-api#1.0.0~start: Failed to exec start script
12 verbose stack Error: test-api#1.0.0 start: `nodemon index.js`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/home/iamuser/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:400:28)
12 verbose stack at maybeClose (internal/child_process.js:1055:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
13 verbose pkgid test-api#1.0.0
14 verbose cwd /home/iamuser/Documents/JS/rapid_api/test-api
15 verbose Linux 5.11.0-44-generic
16 verbose argv "/home/iamuser/.nvm/versions/node/v14.17.6/bin/node" "/home/iamuser/.nvm/versions/node/v14.17.6/bin/npm" "run" "start"
17 verbose node v14.17.6
18 verbose npm v6.14.15
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error test-api#1.0.0 start: `nodemon index.js`
23 error spawn ENOENT
24 error Failed at the test-api#1.0.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
package.json:
{
"name": "test-api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon index.js"
},
"author": "iamuser",
"license": "ISC",
"dependencies": {
"axios": "^0.24.0",
"cheerio": "^1.0.0-rc.10",
"express": "^4.17.1"
}
}
As #ndenasie said, nodemon isn't installed. Try running npm install -g nodemon then npm run start and it should work.
Since the comment worked, this is just a response for you to mark as the best answer to close the thread.

Some issue has been occurring for 2 days and I am unable to solve it in npm start

I have tried npm clear cache --force, removing node_modules/ and package-lock.json and then again npm install and then npm build and finally npm run dev. But unfortunately this failed around 5-6 times.
My Errors:
npm ERR! errno 1
npm ERR! with-redux-toolkit#1.0.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the with-redux-toolkit#1.0.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\divya\AppData\Roaming\npm-cache\_logs\2021-08-25T14_05_46_415Z-debug.log
My debug logs:
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-script',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm#6.14.14
3 info using node#v14.17.4
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle with-redux-toolkit#1.0.0~prebuild: with-redux-toolkit#1.0.0
6 info lifecycle with-redux-toolkit#1.0.0~build: with-redux-toolkit#1.0.0
7 verbose lifecycle with-redux-toolkit#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle with-redux-toolkit#1.0.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;M:\Amazon-starter-template-nextjs\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\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Users\divya\AppData\Local\Programs\AdoptOpenJDK\jdk-11.0.11.9-hotspot\bin;C:\Users\divya\AppData\Local\Microsoft\WindowsApps;;C:\Users\divya\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\divya\AppData\Roaming\npm
9 verbose lifecycle with-redux-toolkit#1.0.0~build: CWD: M:\Amazon-starter-template-nextjs
10 silly lifecycle with-redux-toolkit#1.0.0~build: Args: [ '/d /s /c', 'next build' ]
11 silly lifecycle with-redux-toolkit#1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle with-redux-toolkit#1.0.0~build: Failed to exec build script
13 verbose stack Error: with-redux-toolkit#1.0.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:400:28)
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:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1055:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid with-redux-toolkit#1.0.0
15 verbose cwd M:\Amazon-starter-template-nextjs
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run-script" "build"
18 verbose node v14.17.4
19 verbose npm v6.14.14
20 error code ELIFECYCLE
21 error errno 1
22 error with-redux-toolkit#1.0.0 build: `next build`
22 error Exit status 1
23 error Failed at the with-redux-toolkit#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 ]
My package.json file:
{
"name": "with-redux-toolkit",
"version": "1.0.0",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"#heroicons/react": "^1.0.4",
"#reduxjs/toolkit": "1.5.0",
"#tailwindcss/line-clamp": "^0.2.0",
"firebase": "^8.6.1",
"firebase-admin": "^9.8.0",
"heroicons-react": "^1.4.1",
"hoist-non-react-statics": "^3.3.2",
"next": "^11.1.0",
"next-fonts": "^1.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "7.2.2"
},
"license": "MIT",
"devDependencies": {
"autoprefixer": "^10.2.5",
"postcss": "^8.2.15",
"tailwindcss": "^2.2.7"
}
}
As the error says itself, this is not a problem with NPM. Only we have to do is
instead of,
npm run build -prod
extend the javascript memory by following,
node --max_old_space_size=4096 node_modules/#angular/cli/bin/ng build --prod
npm install --cache /tmp/empty-cache
npm run build
(I tried cache clean but not work)

React Native start failed with error code -4094 how to solve this ONCE for ALL?

I'm trying to run react-native start (as all the other days, it works normally) and it gives me this error:
THE ERROR
Loading dependency graph...events.js:287
throw er; // Unhandled 'error' event
^
Error: UNKNOWN: unknown error, lstat 'C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2\node_modules\jest-util\node_modules\.bin\mkdirp'
Emitted 'error' event on NodeWatcher instance at:
at NodeWatcher.checkedEmitError (C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2\node_modules\sane\src\node_watcher.js:143:12)
at Walker.emit (events.js:310:20)
at C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2\node_modules\walker\lib\walker.js:52:12
at FSReqCallback.oncomplete (fs.js:167:21) {
errno: -4094,
code: 'UNKNOWN',
syscall: 'lstat',
path: 'C:\\Users\\OKR\\Desktop\\MeetUp App\\Development\\MeetUp2\\node_modules\\jest-util\\node_modules\\.bin\\mkdirp'
}
ERROR 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 'start'
1 verbose cli ]
2 info using npm#6.14.4
3 info using node#v12.16.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle MeetUp2#0.0.1~prestart: MeetUp2#0.0.1
6 info lifecycle MeetUp2#0.0.1~start: MeetUp2#0.0.1
7 verbose lifecycle MeetUp2#0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle MeetUp2#0.0.1~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2\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\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_152\bin;C:\Program Files\nodejs\;C:\Users\OKR\AppData\Local\Microsoft\WindowsApps;C:\Users\OKR\AppData\Local\atom\bin;C:\Users\OKR\AppData\Local\Programs\Microsoft VS Code\bin;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\MinGW\bin;D:\Genymotion\tools;C:\Users\OKR\AppData\Roaming\npm
9 verbose lifecycle MeetUp2#0.0.1~start: CWD: C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2
10 silly lifecycle MeetUp2#0.0.1~start: Args: [ '/d /s /c', 'react-native start' ]
11 silly lifecycle MeetUp2#0.0.1~start: Returned: code: 1 signal: null
12 info lifecycle MeetUp2#0.0.1~start: Failed to exec start script
13 verbose stack Error: MeetUp2#0.0.1 start: `react-native start`
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:310: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: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 MeetUp2#0.0.1
15 verbose cwd C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
18 verbose node v12.16.3
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error MeetUp2#0.0.1 start: `react-native start`
22 error Exit status 1
23 error Failed at the MeetUp2#0.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
WHAT I'VE TRIED
Deleted node_modules packages and package-lock.json and run npm install. It still fails after many trials
Update node.js to the latest-recommended version: 12.16.3. Then repeat the above step and it still fails
Run npm cache clean ( gives error) and reapeat step 1 --> Fail
EDIT 1 I have tried react-native start --reset-cache and it gives the same error
EDIT 2 I've tried: npm cache clean --force and it gives me error:
npm ERR! code UNKNOWN
npm ERR! syscall unlink
npm ERR! path C:\Users\OKR\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935
npm ERR! errno -4094
npm ERR! UNKNOWN: unknown error, unlink 'C:\Users\OKR\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\OKR\AppData\Roaming\npm-cache\_logs\2020-05-26T13_16_06_204Z-debug.log
The logs
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 'cache',
1 verbose cli 'clean',
1 verbose cli '--force'
1 verbose cli ]
2 info using npm#6.14.4
3 info using node#v12.16.3
4 warn using --force I sure hope you know what you are doing.
5 verbose npm-session ec09bc51399022bd
6 verbose stack Error: UNKNOWN: unknown error, unlink 'C:\Users\OKR\AppData\Roaming\npm-cache_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935'
7 verbose cwd C:\Users\OKR\Desktop\MeetUp App\Development\MeetUp2
8 verbose Windows_NT 10.0.17763
9 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "cache" "clean" "--force"
10 verbose node v12.16.3
11 verbose npm v6.14.4
12 error code UNKNOWN
13 error syscall unlink
14 error path C:\Users\OKR\AppData\Roaming\npm-cache_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935
15 error errno -4094
16 error UNKNOWN: unknown error, unlink 'C:\Users\OKR\AppData\Roaming\npm-cache_cacache\content-v2\sha512\30\b7\d403a3bea9ab8b0dbca6fa631982d5c21917c8c72428787e88295705b25c8e0c47bf12524dc2bd05a21437c46e02e872ba6e4dca60f3d7c0754993757935'
17 verbose exit [ -4094, true ]
(I can't put the above log in code format since Stack Overflow doesn't allow to)
EDIT 3: I've tried to run cmd in administrator mode but it throws the same error
EDIT 4: I've tried npm start and it gives me this error:
Loading dependency graph...events.js:287
throw er; // Unhandled 'error' event
^
Error: UNKNOWN: unknown error, lstat 'C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\jest-util\node_modules\.bin\mkdirp'
Emitted 'error' event on NodeWatcher instance at:
at NodeWatcher.checkedEmitError (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\sane\src\node_watcher.js:143:12)
at Walker.emit (events.js:310:20)
at C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\walker\lib\walker.js:52:12
at FSReqCallback.oncomplete (fs.js:167:21) {
errno: -4094,
code: 'UNKNOWN',
syscall: 'lstat',
path: 'C:\\Users\\OKR\\Desktop\\MeetUp_App\\Development\\MeetUp2\\node_modules\\jest-util\\node_modules\\.bin\\mkdirp'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! MeetUp2#0.0.1 start: `react-native start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the MeetUp2#0.0.1 start 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\OKR\AppData\Roaming\npm-cache\_logs\2020-05-27T11_29_28_113Z-debug.log
The logs:
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 'start'
1 verbose cli ]
2 info using npm#6.14.5
3 info using node#v12.16.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle MeetUp2#0.0.1~prestart: MeetUp2#0.0.1
6 info lifecycle MeetUp2#0.0.1~start: MeetUp2#0.0.1
7 verbose lifecycle MeetUp2#0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle MeetUp2#0.0.1~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\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\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\Java\jdk1.8.0_152\bin;C:\Program Files\nodejs\;C:\Users\OKR\AppData\Local\Microsoft\WindowsApps;C:\Users\OKR\AppData\Local\atom\bin;C:\Users\OKR\AppData\Local\Programs\Microsoft VS Code\bin;c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools;C:\MinGW\bin;D:\Genymotion\tools;C:\Users\OKR\AppData\Roaming\npm
9 verbose lifecycle MeetUp2#0.0.1~start: CWD: C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2
10 silly lifecycle MeetUp2#0.0.1~start: Args: [ '/d /s /c', 'react-native start' ]
11 silly lifecycle MeetUp2#0.0.1~start: Returned: code: 1 signal: null
12 info lifecycle MeetUp2#0.0.1~start: Failed to exec start script
13 verbose stack Error: MeetUp2#0.0.1 start: `react-native start`
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:310: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: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 MeetUp2#0.0.1
15 verbose cwd C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.16.3
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error MeetUp2#0.0.1 start: `react-native start`
22 error Exit status 1
23 error Failed at the MeetUp2#0.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
EDIT 5: I've tried to run the command to upgrade react-native using npx react-native upgrade. And it gives this error:
info No version passed. Fetching latest...
info Fetching diff between v0.61.5 and v0.62.2...
info Applying diff...
warn Excluding files that exist in the template, but not in your project:
error Automatically applying diff failed. We did our best to automatically upgrade as many files as possible
warn Continuing after failure. Some of the files are upgraded but you will need to deal with conflicts manually
info Installing "react-native#0.62.2" and its peer dependencies...
error Command failed: npm install --save --save-exact react-native#0.62.2 react#16.11.0
npm ERR! Cannot read property 'match' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\OKR\AppData\Roaming\npm-cache\_logs\2020-05-27T11_26_44_748Z-debug.log
. Run CLI with --verbose flag for more details.
Error: Command failed: npm install --save --save-exact react-native#0.62.2 react#16.11.0
npm ERR! Cannot read property 'match' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\OKR\AppData\Roaming\npm-cache\_logs\2020-05-27T11_26_44_748Z-debug.log
at makeError (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\execa\index.js:174:9)
at C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async installDeps (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\react-native\node_modules\#react-native-community\cli\build\commands\upgrade\upgrade.js:206:3)
at async Object.upgrade [as func] (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\react-native\node_modules\#react-native-community\cli\build\commands\upgrade\upgrade.js:345:9)
at async Command.handleAction (C:\Users\OKR\Desktop\MeetUp_App\Development\MeetUp2\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:182:9)
My package.json
{
"name": "MeetUp2",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#eva-design/eva": "^1.4.0",
"#mapbox/polyline": "^1.1.0",
"#react-native-community/cameraroll": "^1.6.1",
"#react-native-community/datetimepicker": "^2.3.2",
"#react-native-community/google-signin": "^4.0.1",
"#react-native-community/masked-view": "^0.1.10",
"#react-native-firebase/admob": "^6.7.1",
"#react-native-firebase/app": "^6.7.1",
"#react-native-firebase/auth": "^6.7.1",
"#react-native-firebase/firestore": "^6.7.1",
"#react-native-firebase/storage": "^6.7.1",
"#react-navigation/drawer": "^5.7.1",
"#react-navigation/native": "^5.2.6",
"#react-navigation/stack": "^5.3.1",
"#ui-kitten/components": "^4.4.1",
"axios": "^0.19.2",
"lodash": "^4.17.15",
"moment": "^2.25.3",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-collapsingtoolbar": "^1.0.3",
"react-native-device-info": "^5.5.7",
"react-native-fbsdk": "^1.1.2",
"react-native-geolocation-service": "^4.0.1",
"react-native-gesture-handler": "^1.6.1",
"react-native-get-random-values": "^1.4.0",
"react-native-image-picker": "^2.3.1",
"react-native-keychain": "^6.0.0",
"react-native-maps": "^0.27.1",
"react-native-modal-datetime-picker": "^8.6.0",
"react-native-paper": "^3.10.1",
"react-native-reanimated": "^1.8.0",
"react-native-redash": "^14.0.4",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.7.0",
"react-native-share": "^3.3.2",
"react-native-svg": "^12.1.0",
"react-native-tab-view": "^2.14.0",
"react-native-vector-icons": "^6.6.0",
"react-native-view-shot": "^3.1.2",
"react-navigation-header-buttons": "^3.0.5",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "^0.12.0",
"uuid": "^8.0.0"
},
"devDependencies": {
"#babel/core": "^7.9.6",
"#babel/runtime": "^7.9.6",
"#react-native-community/eslint-config": "^0.0.7",
"babel-jest": "^25.5.1",
"eslint": "^6.8.0",
"jest": "^25.5.4",
"jetifier": "^1.6.5",
"metro-react-native-babel-preset": "^0.59.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
}
}
PLEASE HELP ME
Looks like the issue is with the npm cache. Try the following solution:
Run the command: npm cache verify
If you get errors then run: npm cache clear --force
Right Click on C: > Properties > Tools Tab.
Select Check or Check-now under Error Checking menu.
Reboot your PC after the process is completed.

How to resolve the "functions predeploy error: Command terminated with non-zero exit code126"

I am getting the error below:
=== Deploying to 'nompu-website'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
functions# lint /home/superlelo/Desktop/publishToday/functions
eslint .
sh: 1: eslint: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! functions# lint: eslint .
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the functions# lint 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! /home/superlelo/.npm/_logs/2019-09-24T15_05_43_357Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code126
When I run the command: firebase deploy --only functions. I get the same error when I am with or without admin privileges.
My package.json file looks like this:
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"build":"npm run build",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "8"
},
"dependencies": {
"firebase-admin": "^8.0.0",
"firebase-functions": "^3.1.0"
},
"devDependencies": {
"eslint": "^5.12.0",
"eslint-plugin-promise": "^4.0.1",
"firebase-functions-test": "^0.1.6"
},
"private": true
}
Here is the complete log file:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli '--prefix',
1 verbose cli '/home/superlelo/Desktop/publishToday/functions',
1 verbose cli 'run',
1 verbose cli 'lint' ]
2 info using npm#6.9.0
3 info using node#v10.16.3
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle functions#~prelint: functions#
6 info lifecycle functions#~lint: functions#
7 verbose lifecycle functions#~lint: unsafe-perm in lifecycle true
8 verbose lifecycle functions#~lint: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/superlelo/Desktop/publishToday/functions/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/usr/games:/sbin:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/superlelo/bin:/usr/bin/java/bin:/home/superlelo/Android/sdk/emulator:/home/superlelo/Android/sdk/tools:/home/superlelo/Android/sdk/tools/bin:/home/superlelo/Android/sdk/platform-tools
9 verbose lifecycle functions#~lint: CWD: /home/superlelo/Desktop/publishToday/functions
10 silly lifecycle functions#~lint: Args: [ '-c', 'eslint .' ]
11 silly lifecycle functions#~lint: Returned: code: 126 signal: null
12 info lifecycle functions#~lint: Failed to exec lint script
13 verbose stack Error: functions# lint: `eslint .`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid functions#
15 verbose cwd /home/superlelo/Desktop/publishToday
16 verbose Linux 4.15.0-64-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "--prefix" "/home/superlelo/Desktop/publishToday/functions" "run" "lint"
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 126
22 error functions# lint: `eslint .`
22 error Exit status 126
23 error Failed at the functions# lint script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
Can anyone suggest how can I resolve this? I am using npm 6.9.0 on a linux Ubuntu bionic beaver.
Thanks

npm run build gives out npm ERR! code ELIFECYCLE

I'm very new to Node.js and Electron and wanted to run npm run build. Unfortunately, that only gives me out the error code ELIFECYCLE.
Here is my package.json:
{
"name": "firstelectronproject",
"version": "0.1.0",
"description": "My first Electron project",
"main": "main.js",
"scripts": {
"start": "electron index.js",
"package": "",
"build": "electron-packager . FEP"
},
"author": "F9lke <florian.thomasgoetzrath.de>",
"license": "MIT",
"dependencies": {
"electron": "^1.6.11"
},
"devDependencies": {
"asar": "^0.13.0",
"electron-packager": "^8.7.2"
}
}
Here is the log of my command prompt:
D:\Eigene Dateien\Desktop\Coding\Desktop Apps\FEP>npm run build
> firstelectronproject#0.1.0 build D:\Eigene Dateien\Desktop\Coding\Desktop Apps\FEP
> electron-packager . FEP
Packaging app for platform win32 x64 using electron v1.6.11
Command failed: npm prune --production
npm WARN invalid config loglevel="notice"
npm WARN firstelectronproject#0.1.0 No repository field.
npm ERR! May not delete: C:\Users\User\AppData\Local\Temp\electron-packager\win32-x64\FEP-win32-x64\resources\app\node_modules\.bin
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2017-07-21T11_38_37_230Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! firstelectronproject#0.1.0 build: `electron-packager . FEP`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the firstelectronproject#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\User\AppData\Roaming\npm-cache\_logs\2017-07-21T11_38_37_293Z-debug.log
And here is the log output:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#5.3.0
3 info using node#v6.11.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle firstelectronproject#0.1.0~prebuild: firstelectronproject#0.1.0
6 info lifecycle firstelectronproject#0.1.0~build: firstelectronproject#0.1.0
7 verbose lifecycle firstelectronproject#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle firstelectronproject#0.1.0~build: PATH: C:\Users\User\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;D:\Eigene Dateien\Desktop\Coding\Desktop Apps\FEP\node_modules\.bin;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Brackets\command;C:\Program Files\nodejs\;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Users\User\AppData\Local\atom\bin;C:\Users\User\AppData\Roaming\npm
9 verbose lifecycle firstelectronproject#0.1.0~build: CWD: D:\Eigene Dateien\Desktop\Coding\Desktop Apps\FEP
10 silly lifecycle firstelectronproject#0.1.0~build: Args: [ '/d /s /c', 'electron-packager . FEP' ]
11 silly lifecycle firstelectronproject#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle firstelectronproject#0.1.0~build: Failed to exec build script
13 verbose stack Error: firstelectronproject#0.1.0 build: `electron-packager . FEP`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:891:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid firstelectronproject#0.1.0
15 verbose cwd D:\Eigene Dateien\Desktop\Coding\Desktop Apps\FEP
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v6.11.1
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error firstelectronproject#0.1.0 build: `electron-packager . FEP`
22 error Exit status 1
23 error Failed at the firstelectronproject#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 seems to be related to a bug in electron-packager. As a workaround you could downgrade electron-packager to e.g. ^7.7.0. Also, you need to update the build command slightly, see below (Note, only showing the relevant parts):
{
"scripts": {
"build": "electron-packager ./ --platform=linux --arch=x64"
},
"dependencies": {
"electron": "^1.6.11"
},
"devDependencies": {
"electron-packager": "^7.7.0"
}
}
Note that you can use --all to build for all platforms.
Updating npm on server worked for me.
I solved this problem by installing the array unique and it started working:
npm install --save array-unique
I encountered a similar problem with electron-packager. Just added ./ --all to the end of the pack directive. Final result given below:
"pack": "electron-packager ./ --all"

Categories