I've installed the eslint package and added a series of scripts to package.json.
"scripts": {
"start": "node index.js",
"test": "node_modules/.bin/jasmine-node spec --color --verbose --autotest --watch .",
"acceptance": "node_modules/.bin/forever stopall && node_modules/.bin/forever start index.js && ./node_modules/.bin/jasmine-node test/ --verbose && node_modules/.bin/forever stopall",
"coverage": "./node_modules/.bin/istanbul cover -x **spec/** -x **index.js** -x **debug.js** jasmine-node spec",
"doc": "node_modules/.bin/jsdoc modules/",
"linter": "node_modules/.bin/eslint ."
}
When running these scripts I meet with mixed success. npm run test, nom run coverage, nom run doc all run without errors but npm run acceptance and npm run linter run the script then throw a series of errors, (I have copied the linter example below).
npm ERR! Darwin 16.0.0
npm ERR! argv "/Users/user/.nvm/versions/node/v6.7.0/bin/node"
"/Users/user/.nvm/versions/node/v6.7.0/bin/npm" "run" "linter"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! todo#1.0.0 linter: `eslint .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todo#1.0.0 linter script 'eslint .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the todo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs todo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls todo
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/user/Documents/todo/npm-debug.log
The acceptance tests won't even start the script before running. Why am I getting these errors? The contents of npm-debug.log are:
0 info it worked if it ends with ok
1 verbose cli [ '/Users/user/.nvm/versions/node/v6.7.0/bin/node',
1 verbose cli '/Users/user/.nvm/versions/node/v6.7.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'linter' ]
2 info using npm#3.10.3
3 info using node#v6.7.0
4 verbose run-script [ 'prelinter', 'linter', 'postlinter' ]
5 info lifecycle todo#1.0.0~prelinter: todo#1.0.0
6 silly lifecycle todo#1.0.0~prelinter: no script for prelinter, continuing
7 info lifecycle todo#1.0.0~linter: todo#1.0.0
8 verbose lifecycle todo#1.0.0~linter: unsafe-perm in lifecycle true
9 verbose lifecycle todo#1.0.0~linter: PATH: /Users/user/.nvm/versions/node/v6.7.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/user/Documents/todo/node_modules/.bin:/Users/user/.nvm/versions/node/v6.7.0/bin:/Users/user/google-cloud-sdk/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/user/.nvm/versions/node/v6.7.0/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/usr/texbin
10 verbose lifecycle todo#1.0.0~linter: CWD: /Users/user/Documents/todo
11 silly lifecycle todo#1.0.0~linter: Args: [ '-c', 'eslint .' ]
12 silly lifecycle todo#1.0.0~linter: Returned: code: 1 signal: null
13 info lifecycle todo#1.0.0~linter: Failed to exec linter script
14 verbose stack Error: todo#1.0.0 linter: `eslint .`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/Users/user/.nvm/versions/node/v6.7.0/lib/node_modules/npm/lib/utils/lifecycle.js:242:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/Users/user/.nvm/versions/node/v6.7.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid todo#1.0.0
16 verbose cwd /Users/user/Documents/todo
17 error Darwin 16.0.0
18 error argv "/Users/user/.nvm/versions/node/v6.7.0/bin/node" "/Users/user/.nvm/versions/node/v6.7.0/bin/npm" "run" "linter"
19 error node v6.7.0
20 error npm v3.10.3
21 error code ELIFECYCLE
22 error todo#1.0.0 linter: `eslint .`
22 error Exit status 1
23 error Failed at the todo#1.0.0 linter script 'eslint .'.
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 todo package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error eslint .
23 error You can get information on how to open an issue for this project with:
23 error npm bugs todo
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls todo
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Related
I am having a problem running my system on my local server.
I tried running npm install then npm run start then I start getting this error :
Failed to compile
./src/app/App.js
Module not found: Can't resolve 'assets/css/style.css' in '/Volumes/Macbook Pro/02 - Business/03 - Projects/01 - All Clients/VS/MLM/03 - Source Codes/Live System/console/src/app'
I tried npm install npm run build then I get the following error :
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! console2#0.1.0 build: `npm run build-css && react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the console2#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! /Users/av/.npm/_logs/2021-09-27T13_40_54_796Z-debug.log
I checked the logged file and I found this :
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.15
3 info using node#v14.17.6
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle console2#0.1.0~prebuild: console2#0.1.0
6 info lifecycle console2#0.1.0~build: console2#0.1.0
7 verbose lifecycle console2#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle console2#0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Volumes/Macbook Pro/02 - Business/03 - Projects/01 - All Clients/VS/MLM/03 - Source Codes/Live System/console/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle console2#0.1.0~build: CWD: /Volumes/Macbook Pro/02 - Business/03 - Projects/01 - All Clients/VS/MLM/03 - Source Codes/Live System/console
10 silly lifecycle console2#0.1.0~build: Args: [ '-c', 'npm run build-css && react-scripts build' ]
11 silly lifecycle console2#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle console2#0.1.0~build: Failed to exec build script
13 verbose stack Error: console2#0.1.0 build: `npm run build-css && react-scripts build`
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:400:28)
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: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 console2#0.1.0
15 verbose cwd /Volumes/Macbook Pro/02 - Business/03 - Projects/01 - All Clients/VS/MLM/03 - Source Codes/Live System/console
16 verbose Darwin 18.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v14.17.6
19 verbose npm v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error console2#0.1.0 build: `npm run build-css && react-scripts build`
22 error Exit status 1
23 error Failed at the console2#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 ]
I tried the following steps but I'm getting the same error :
npm cache clean --force
delete node_modules folder
delete package-lock.json file
sudo npm install npm#latest -g this will upgrade npm to latest version
npm audit fix --force
npm upgrade --force
npm install
should assets/css/style.css be ../assets/css/style.css or some other relative path depending on what file it is in?
I'm running "npm install node-sass" from git-bash-cli in Windows 10 and getting a "'node' is not recognized as an internal or external command,
operable program or batch file." error.
I have been using this setup for years and the issues started when I upgraded node to 10.16.0
To prevent unnecessary replies:
All the questions I have seen simply say to add the path variable.
I have added Node to the PATH variable and tried a number of different ways of writing it. I ended up reinstalling Node.js and that does it automatically, so I just left it as that.
node runs from the command line, just not from scripts, like scripts in the package.json file.
I have tried reinstalling node 8.11.3, which is the version I was using before the problems started, but I get the same error. I am back to v 10.16.0 again.
Error code is as follows:
> node-sass#4.12.0 install C:\projects\true\true\website\truevue\node_modules\node-sass
> node scripts/install.js
'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.7 (node_modules\#nuxt\builder\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.12.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.12.0 install 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\Peter\AppData\Roaming\npm-cache\_logs\2019-07-24T23_41_06_896Z-debug.log
Here's the log when I run npm run dev on a Vue project I'm working on
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Peter\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using npm#6.10.2-next.1
3 info using node#v10.16.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle thisistrue.co#1.0.0~predev: thisistrue.co#1.0.0
6 info lifecycle thisistrue.co#1.0.0~dev: thisistrue.co#1.0.0
7 verbose lifecycle thisistrue.co#1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle thisistrue.co#1.0.0~dev: PATH: C:\Users\Peter\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\projects\true\true\website\truevue\node_modules\.bin
9 verbose lifecycle thisistrue.co#1.0.0~dev: CWD: C:\projects\true\true\website\truevue
10 silly lifecycle thisistrue.co#1.0.0~dev: Args: [ '/d /s /c',
10 silly lifecycle 'cross-env NODE_ENV=development nodemon server/index.js --watch server' ]
11 silly lifecycle thisistrue.co#1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle thisistrue.co#1.0.0~dev: Failed to exec dev script
13 verbose stack Error: thisistrue.co#1.0.0 dev: `cross-env NODE_ENV=development nodemon server/index.js --watch server`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Peter\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:317:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Peter\AppData\Roaming\npm\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 thisistrue.co#1.0.0
15 verbose cwd C:\projects\true\true\website\truevue
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Peter\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v10.16.0
19 verbose npm v6.10.2-next.1
20 error code ELIFECYCLE
21 error errno 1
22 error thisistrue.co#1.0.0 dev: `cross-env NODE_ENV=development nodemon server/index.js --watch server`
22 error Exit status 1
23 error Failed at the thisistrue.co#1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Finally found an answer to this.
All I ended up doing was running npm update -g and it fixed the issue
Thanks all who helped, hope this can help someone else
I think you must add the path of node.js to the system variable
First: open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables
Second: in "User variables" or "System variables" find variable PATH and add node.js folder path as value.it is C:\Program Files\nodejs;If it doesn't exists, create it.
Third: Restart your computer.
I'm working on Visual Studio 2017 using Ionic v2, I'm trying to write an app that scan beacons. But everytime I install a plugin I get errors from the npm regarding the versions of node and npm itself.
My current versions:
Cordova version: 7.0.1
Npm version: 5.0.3
Node version: 8.1.3
For example I installed cordova bluetoothle plugin and that's the error I get:
npm ERR! node v5.4.1
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! io.cordova.myappd95ddb# build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the io.cordova.myappd95ddb# build script 'ionic-app-
scripts build'.
npm ERR! This is most likely a problem with the io.cordova.myappd95ddb
package,
npm ERR! not with npm itself.
I looked on the internet but apparently there aren't many update plugins that work with bluetooth, does that mean I necessarily need to downgrade my node and npm version?
Do you know any other plugin I could use?
npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Web\\External\\Node.exe',
1 verbose cli 'C:\\Program Files (x86)\\Microsoft Visual
Studio\\2017\\Community\\Web\\External\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build',
1 verbose cli '--color=always' ]
2 info using npm#3.3.4
3 info using node#v5.4.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle io.cordova.myappd95ddb#~prebuild: io.cordova.myappd95ddb#
6 silly lifecycle io.cordova.myappd95ddb#~prebuild: no script for prebuild, continuing
7 info lifecycle io.cordova.myappd95ddb#~build: io.cordova.myappd95ddb#
8 verbose lifecycle io.cordova.myappd95ddb#~build: unsafe-perm in lifecycle true
9 verbose lifecycle io.cordova.myappd95ddb#~build: PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\bin\node-gyp-bin;C:\Users\giuli\Documents\Visual Studio 2017\Projects\test\test\node_modules\.bin;.\node_modules\.bin;C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\COMMUNITY\Web\External;C:\Program Files\Java\jdk1.7.0_79\bin;C:\Program Files\Git\cmd;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\MATLAB\R2016a\runtime\win64;C:\Program Files\MATLAB\R2016a\bin;C:\Program Files (x86)\PuTTY\;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Users\giuli\AppData\Local\Microsoft\WindowsApps;C:\Users\giuli\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;C:\Program Files\nodejs
10 verbose lifecycle io.cordova.myappd95ddb#~build: CWD: C:\Users\giuli\Documents\Visual Studio 2017\Projects\test\test
11 silly lifecycle io.cordova.myappd95ddb#~build: Args: [ '/d /s /c', 'ionic-app-scripts build' ]
12 silly lifecycle io.cordova.myappd95ddb#~build: Returned: code: 1 signal: null
13 info lifecycle io.cordova.myappd95ddb#~build: Failed to exec build script
14 verbose stack Error: io.cordova.myappd95ddb# build: `ionic-app-scripts build`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\lib\utils\lifecycle.js:233:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:821:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid io.cordova.myappd95ddb#
16 verbose cwd C:\Users\giuli\Documents\Visual Studio 2017\Projects\test\test
17 error Windows_NT 10.0.15063
18 error argv "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Web\\External\\Node.exe" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Web\\External\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" "--color=always"
19 error node v5.4.1
20 error npm v3.3.4
21 error code ELIFECYCLE
22 error io.cordova.myappd95ddb# build: `ionic-app-scripts build`
22 error Exit status 1
23 error Failed at the io.cordova.myappd95ddb# build script 'ionic-app-scripts build'.
23 error This is most likely a problem with the io.cordova.myappd95ddb package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ionic-app-scripts build
23 error You can get their info via:
23 error npm owner ls io.cordova.myappd95ddb
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Solved like this: In Vs open Tools/Options/Project and Solution/ External Web Package. Move $PATH on top of ../external.
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"
My co-worker told me to checkout a Git repo that he's been working on.
The app uses NodeJS. I did "git clone" and then "npm install". My co-worker told me to then run "npm start". I tried this and I got an error. We decided the problem was my old version of Node. He was running with version 4 and I was way back on 0.6.
So I upgraded. I am on a Mac. I uninstalled Node using Homebrew, then re-installed Node using Homebrew.
Now:
node -v
v6.5.0
So now I do "npm install" and then "npm start". Now I get a different error:
npm start
> api-reference#0.0.1 start /Users/lLRK9/projects/zeria/api
> node server.js
module.js:457
throw err;
^
Error: Cannot find module './config/manifest.json'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/lLRK9/projects/zeria/api/server.js:5:18)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.5.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! api-reference#0.0.1 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the api-reference#0.0.1 start script 'node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the api-reference package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs api-reference
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls api-reference
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/lLRK9/projects/zeria/api/npm-debug.log
cat /Users/lLRK9/projects/zeria/api/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.5.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start' ]
2 info using npm#3.10.3
3 info using node#v6.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle api-reference#0.0.1~prestart: api-reference#0.0.1
6 silly lifecycle api-reference#0.0.1~prestart: no script for prestart, continuing
7 info lifecycle api-reference#0.0.1~start: api-reference#0.0.1
8 verbose lifecycle api-reference#0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle api-reference#0.0.1~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/lLRK9/projects/zeria/api/node_modules/.bin:/usr/local/Cellar/node/6.5.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Cellar/node/6.5.0/bin/node:/usr/local/bin/brew:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/mysql/bin
10 verbose lifecycle api-reference#0.0.1~start: CWD: /Users/lLRK9/projects/zeria/api
11 silly lifecycle api-reference#0.0.1~start: Args: [ '-c', 'node server.js' ]
12 silly lifecycle api-reference#0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle api-reference#0.0.1~start: Failed to exec start script
14 verbose stack Error: api-reference#0.0.1 start: `node server.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:242:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid api-reference#0.0.1
16 verbose cwd /Users/lLRK9/projects/zeria/api
17 error Darwin 15.6.0
18 error argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "start"
19 error node v6.5.0
20 error npm v3.10.3
21 error code ELIFECYCLE
22 error api-reference#0.0.1 start: `node server.js`
22 error Exit status 1
23 error Failed at the api-reference#0.0.1 start script 'node server.js'.
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 api-reference package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node server.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs api-reference
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls api-reference
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
This app works for my co-worker. What differences in our setups might allow this app to work for him, but not for me?
Error: Cannot find module './config/manifest.json'
This looks like some local config file you're missing. You should ask him for it.
Alternatively, if there is an install hook in the package.json of the module, it may be attempting to configure this manifest.json file automatically, and it's possible that install script failed. You should check if there is any custom install hook as well.
(Also, I'd recommend using n in the future for managing Node.js versions).