When I try to build a project with Maven, which calls npm, it fails with such an error message:
[ERROR] npm ERR! code 1
[ERROR] npm ERR! path C:\(path to some node module)
[ERROR] npm ERR! command failed
[ERROR] npm ERR! command C:\windows\system32\cmd.exe /d /s /c node scripts/install.js
[ERROR] npm ERR! 'node' is not recognized as an internal or external command,
[ERROR] npm ERR! operable program or batch file.
The node program is normally present and available from the same terminal. What can cause such an error?
A npm ERR! code 1 usually occurs when npm fails to install a node module. Check the latest version for your module, update it in package.json and run
npm install again. If this doesn't work, you can downgrade your version of npm to a more stable one and try again.
Related
I use visual studio code and I tried to use opencv in my project.
npm install opencv4nodejs
Error:
ERR! Error: failed to execute cmake --version, cmake is required to build opencv, error is: Error: Command failed: cmake --version
'cmake'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α�, �Ǵ�
��ġ ������ �ƴմϴ�.
npm ERR! opencv-build#0.1.9 install: `node ./install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build#0.1.9 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:
I thought it was an error for cmake, but I already installed cmake(version:3.20.3)
How can I fix this problem? I use Windows.
I am Facing trouble in installing opencv4nodejs in windows, i am getting following error.
opencv-build#0.0.15 install C:\Users\Mypc\AppData\Roaming\npm\node_modules\opencv4nodejs\node_modules\opencv-build
node ./install.js
info install if you want to use an own OpenCV installation set OPENCV4NODEJS_DISABLE_AUTOBUILD
info install library dir does not exist: C:\Users\Mypc\AppData\Roaming\npm\node_modules\opencv4nodejs\node_modules\opencv-build\opencv\build\lib\Release
info install running install script...
ERR! Error: Command failed: git --version
'git' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv-build#0.0.15 install: node ./install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build#0.0.15 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:
Git was not installed in windows, that was the issue. it's working perfectly now.
Git needs to be installed, it will solve this problem
Ionic :3.20.0
node: v8.10.0
npm: 5.6.0
npm i
✖ Running command - failed!
[ERROR] An error occurred while running npm i (exit code 254):
npm ERR! path
/Users/lucaszimmermann/Desktop/myApp/node_modules/tsickle/src/main.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod
'/Users/lucaszimmermann/Desktop/myApp/node_modules/tsickle/src/main.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR!
/Users/lucaszimmermann/.npm/_logs/2018-04-04T16_41_39_270Z-debug.log
I faced a similar issue after doing the below actions this issue solved.
Delete package-lock.json file.
Open cmd/terminal in administrator mode.
run command: npm install
run command: npm update
Node version is likely incompatible. There'd be an expected version actual version. Use nvm or similar to install and change node versions.
Delete node_modules and try install again. You probably get a message similar to:
error ts-jest#26.1.2: The engine "node" is incompatible with this module. Expected version ">= 10.21.0". Got "10.20.1"
error Found incompatible module.
You wan't try to install npm packages.
You have two options to install some packages:
First Option:
npm install <package>
npm i <package>
Second Option:
If you wan't to create an automated installation process without each package, you must provide an packge.json - Here are all depencies listed. You can only run npm i or npm install without an package name, if you have an package.json
A full documentation about that is on NPM: https://docs.npmjs.com/files/package.json
I tried to reinstall the cordova and reinstall the system, but it didn't work.My cordova version is 7.0.1,node version is v6.10.3 and npm version is 3.10.10.The code for the new project error is as follows.
- E:\cordovaProject>cordova create myapp com.mu myapp -d Using
detached cordova-create Creating a new cordova project. Copying
assets." Using cordova-fetch for
C:\Users\Administrator\AppData\Roaming\npm\node_modules\
cordova\node_modules\_cordova-app-hello-world#3.12.0#cordova-app-hello-world\ind
ex.js Running command: cmd "/s /c ""C:\Program Files\nodejs\npm.cmd"
install C:\Users\
Administrator\AppData\Roaming\npm\node_modules\cordova\node_modules\_cordova-app
-hello-world#3.12.0#cordova-app-hello-world\index.js"" Command finished with error code 4294963238: cmd /s /c ""C:\Program
Files\nodejs \npm.cmd" install
C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordov
a\node_modules\_cordova-app-hello-world#3.12.0#cordova-app-hello-world\index.js"
Error: Uncaught, unspecified "error" event. ( Error from Cordova
Fetch: Error: cmd: Command failed with exit code 4294963238 Error
output: npm ERR! not a package
C:\Users\Administrator\AppData\Roaming\npm\node_modules\c
ordova\node_modules\_cordova-app-hello-world#3.12.0#cordova-app-hello-world\inde x.js npm ERR! addLocal Could not install
C:\Users\Administrator\AppData\Roaming\npm\n
ode_modules\cordova\node_modules\_cordova-app-hello-world#3.12.0#cordova-app-hel
lo-world\index.js npm ERR! path
C:\Users\Administrator\AppData\Local\Temp\npm-8056-980eaa3d\unpack
-8e52606f\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory,
open 'C:\Users\Administrator\
AppData\Local\Temp\npm-8056-980eaa3d\unpack-8e52606f\package.json'
npm ERR! enoent This is most likely not a problem with npm itself npm
ERR! enoent and is related to npm not being able to find a file. npm
ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2017-05-18T0
2_13_23_845Z-debug.log)
Hey I had the same issue as you described above.
And I solved the issue with the answer here.
I have the same issue in Windows when i try add plugin. To resolve, delete the node_modules and retry the command to add the plugin. This resolve my problem.
Open file C:\Users\YOUR-PC-USERNAME\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\cordova-create\node_modules\cordova-fetch\index.js
Find text fetchArgs.push(target);, then insert the following code before this line:
if(fs.existsSync(target) && fs.statSync(target).isFile()){
target = require(target).dirname
}
Package version list:
cordova: 8.1.2
cordova-app-hello-world: 3.12.0
cordova-create: 1.1.2
cordova-fetch: 1.3.1
This works for me.
I want to programm widgets for XBee ZigBee Cloud Kit.
To do it, I need first to set up everything.
I'm using this guide.
After failing repeatedly the automated setup I started the Manual setup. I did install the Requirements. So everything so far went good until the last point: npm install. I'm getting the following error bower install' exited with error code 1. I'm not sure what to do, I'm not used to PowerShell or any other shell.
After failing the installing I get this errors:
bower justgauge#* ECMDERR Failed to
execute "git ls-remote --tags --heads git://github.c
om/oscarcv/justgage.git", exit code of #128 fatal: remote error:
Repository not found.
Additional error details: fatal: remote error: Repository
not found.
'bower install' exited with error code 1
npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i nstall"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! xbee-zigbee-cloud-kit#1.0.0 postinstall: node postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xbee-zigbee-cloud-kit#1.0.0 postinstall script 'node postinstall.js'.
npm ERR! This is most likely a problem with the xbee-zigbee-cloud-kit package,
npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall.js npm ERR!
You can get their info via:
npm ERR! npm owner ls xbee-zigbee-cloud-kit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\steim\Desktop\XBeeZigBeeCloudKit-master\npm-debug.log
"This is most likely a problem with the xbee-zigbee-cloud-kit package"
If this is true, in that case I don't know what to do, because I work with this package.
This is the npm-debug.log. (Sorry I can't post the whole log, too many characters).
I'm using a company laptop:
Latitude D820
Windows 7 32 Bit
Windows PowerShell with Administration
I'm grateful for any kind of help. I'm getting headache trying to figure it out.
I could solve it. And can now run the app now localy.
I did this steps to solve the issue:
Deleting justgage in bower.json file.
Using commandline: bower install justgage-official
Using commandline: bower update
The only problem is actually I can't start with foreman start (but it's another issue), instead I use python manage.py runserver 0.0.0.0:5000. After that in browser: http://localhost:5000
Thanks Etan Reisner for the hint and thanks Oscar Costoya for guiding me.