Hi I am trying to install electron in my windows system using this following commands.
- npm install -g electron
- npm install electron
- npm install electron --save-dev
For all these command I am getting the following error.
C:\Users\abc\Desktop\final\new>electron#
'electron#' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\abc\Desktop\final\new>npm install electron
> electron#1.6.6 postinstall C:\Users\abc\Desktop\final\new\node_modules\electron
> node install.js
C:\Users\abc\Desktop\final\new\node_modules\electron\install.js:47
throw err
^
Error: ENOENT: no such file or directory, lstat 'C:\Users\abc\Desktop\final\new\node_modules\electron\dist\resources'
npm WARN Alfa#1.0.0 No repository field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "electron"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron#1.6.6 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron#1.6.6 postinstall script 'node install.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 electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\abc\AppData\Roaming\npm-cache\_logs\2017-04-30T12_57_18_073Z-debug.log
C:\Users\abc\Desktop\final\new>
I also tried updating node and npm but still I am getting this error. Can someone please help me ? . Thanks in advance.
Recently I had this problem with Node.js v8 on Ubuntu 16.04. But when I downgraded to Node.js v6 then it installed successfully.
Related
i keep getting this error
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\eze samuel\package.json'
npm WARN eze samuel No description
npm WARN eze samuel No repository field.
npm WARN eze samuel No README data
npm WARN eze samuel No license field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bitcore"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! bitcore-node#3.1.3 preinstall: `./scripts/download`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bitcore-node#3.1.3 preinstall script './scripts/download'.
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 bitcore-node package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./scripts/download
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bitcore-node
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bitcore-node
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\eze samuel\npm-debug.log
The bitcore library explicitly tells you to install globally:
Spin up a full node and join the network:
npm install -g bitcore
bitcored
Note the -g flag in the command. Currently, you're running npm install bitcore, which fails because you're trying to install locally without a package.json file. If you're not installing with -g, you must run npm init first before installing anything. In this case, you are installing with -g, so just follow the docs step by step, copying exactly what they tell you.
when i tried to deploy my nodejs app (blockchain) locally, i encountered the below error.
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--quiet"
npm ERR! node v4.7.2
npm ERR! npm v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! hashtable#2.0.2 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hashtable#2.0.2 install script 'node-gyp configure build'.
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 hashtable package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs hashtable
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hashtable
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/app/npm-debug.log
ERROR: Service 'asset-diamond-demo' failed to build: The command '/bin/sh -c npm install --quiet' returned a non-zero code: 1
But when i deployed it from my personal laptop at home, it got deployed.
seems to be not building at office.
can anyone suggest any solutions?
Install nvm and use it to ensure you have a clean, up to date working Node setup. Try installing Node 7.something with nvm instead of 4.
I'm trying to install electron recent version and encountering this error. I tried installing sudo and did downgrade to electron 1.4.5 but this error persists. node version I'm using is v7.1.0
Complete error log
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/6.6.0/bin/node" "/usr/local/bin/npm" "install" "-g" "electron#1.4.5" "--verbose"
npm ERR! node v6.6.0
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! electron#1.4.5 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron#1.4.5 postinstall script 'node install.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 electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.
It turned out to be a problem with the node version I'm using. Possibly electron is not compatible with the newer version of node that is released.
I've installed nvm and installed a lower version of node. In my case v6.3.0. After that I was able to install electron without errors.
had the same issue, also when using sudo.
when i switched to root, the installation worked.
I'm having some trouble installing NW.js. When I run npm install nw, I get these error messages:
> nw#0.12.3 postinstall /root/node_modules/nw
> node scripts/install.js
sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! nw#0.12.3 postinstall: `node scripts/install.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the nw#0.12.3 postinstall script.
npm ERR! This is most likely a problem with the nw package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls nw
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.3.0-kali1-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "nw"
npm ERR! cwd /root
npm ERR! node -v v4.2.6
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0
I'm pretty sure the problem has to do with the first section where it talks about node being installed. I know there's an issue with Debian where the node package is actually already taken, so they use nodejs instead. I don't know enough this to fix it, I've already tried running export node=nodejs and adding it to the ~/.bashrc. Does anyone have any ideas about what I can do? I've had this problem with other npm packages as well.
The nodejs executable is called node, not nodejs. So, just remove the line you added. (export node=nodejs)
If it still won't work: Try reinstall node via package management (apt-get/yum/dnf) or Try reinstall the executable and setup PATH from website (https://nodejs.org/en/download/).
I am on Windows and am trying to follow the instructions at http://yeoman.io/learning/index.html. So far I have successfully installed grunt-cli and bower but when I try to install yo using the following command...
npm install -g yo
...the command prompt returns this:
> spawn-sync#1.0.11 postinstall C:\Users\Aaron\AppData\Roaming\npm\node_modules\yo\node_modules\cross-spawn\node_modules\spawn-sync
> node postinstall
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! file ;C:\Windows\system32\cmd.exe
npm ERR! path ;C:\Windows\system32\cmd.exe
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn ;C:\Windows\system32\cmd.exe
npm ERR! spawn-sync#1.0.11 postinstall: `node postinstall`
npm ERR! spawn ;C:\Windows\system32\cmd.exe ENOENT
npm ERR!
npm ERR! Failed at the spawn-sync#1.0.11 postinstall script 'node postinstall'.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall
npm ERR! You can get their info via:
npm ERR! npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Aaron\AppData\Roaming\npm\node_modules\npm-debug.log
Does anyone have any idea what the hell this means and how I can fix it?
You can try with this : https://github.com/npm/npm/issues/7781
I think this will helps you to solve your question.
And to get node & npm in cmd. You can set node location in windows environment variable. Then restart your cmd & try again to do this.
Try re-installing the setup with feature npm package manager and then get back to your npm install.