I'm a little stumped with this one. Same problem if I try to install -g. The package.json file is empty so not really sure.
{21:32}~/dev/repo/fo-website ➭ npm install gulp
npm ERR! Darwin 14.4.0
npm ERR! argv "/Users/leejohnson/.nvm/versions/v0.12.7/bin/node" "/Users/leejohnson/.nvm/versions/v0.12.7/bin/npm" "install" "gulp"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! file /Users/leejohnson/.npm/clone/1.0.2/package/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
the solution was simple enough: delete the package.json file. Not sure where it came from and why it was empty, but removing it solved the problem.
Related
I am starting with Electron js and I have stumbled on the very first step which is installed Electron.
I am running the following command to install electron provided at
source
npm install electron-prebuilt --save-dev
Following is the result of the command
C:\Users\vikas\Desktop\electron apps\example>npm install electron-prebuilt --sa
ve-dev
electron-prebuilt#0.37.8 postinstall C:\Users\vikas\Desktop\electron apps\exa
mple\node_modules\electron-prebuilt
node install.js
C:\Users\vikas\Desktop\electron apps\example\node_modules\electron-prebuilt\ins
tall.js:22
throw err
^
Error: end of central directory record signature not found
at C:\Users\vikas\Desktop\electron apps\example\node_modules\yauzl\index.js
:167:14
at C:\Users\vikas\Desktop\electron apps\example\node_modules\yauzl\index.js
:473:5
at C:\Users\vikas\Desktop\electron apps\example\node_modules\fd-slicer\inde
x.js:32:7
at FSReqWrap.wrapper as oncomplete
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\vikas\Desktop
\electron apps\example\package.json'
npm WARN example No description
npm WARN example No repository field.
npm WARN example No README data
npm WARN example No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\vikas\AppData\
\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "electron-prebuilt"
"--save-dev"
npm ERR! node v4.4.3
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! electron-prebuilt#0.37.8 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-prebuilt#0.37.8 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-prebuilt pac
kage,
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-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\vikas\Desktop\electron apps\example\npm-debug.log
Windows 8.1
NPM Version 3.8.9
Does C:\Users\vikas\Desktop\electron apps\example\package.json exist? If not try running npm init to create it, and then run npm install electron-prebuilt --save-dev again.
this is bug and a workaround is provided on github : Source
Here is the workaround:
rm -rf ~/.electron/
rm -rf ~/.atom/
npm cache clear
npm install
I was facing a similar issue. But opening the command prompt as administrator (Windows) and reinstalling electron fixed the issue.
I am trying to uninstall npm :
sudo npm uninstall npm
but I am getting this error :
npm ERR! Linux 4.2.0-16-generic npm ERR! argv "/usr/local/bin/node"
"/usr/local/bin/npm" "uninstall"
"npm" npm ERR! node v5.6.0 npm ERR!
npm v3.6.0 npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'cmd-shim' npm ERR! npm ERR! If you need
help, you may report this error at: npm ERR!
https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/techvalley/dev/workspace/npm-debug.log
Anybody knows why?
Thank you.
Uninstall node, it should remove npm.
I am having a strange problem with npm in my ubuntu 14.04. I have a package.json file in my project directory. when i try to run
npm install
it fails. It logs something like
is related to insufficient space on your system.
But i have checked that there is enough available space in my directory.
Here is the log
npm ERR! tar.unpack untar error /home/rafi/.npm/core-js/1.2.6/package.tgz
npm ERR! tar.unpack untar error /home/rafi/.npm/caniuse-db/1.0.30000384/package.tgz
npm ERR! Linux 3.16.0-49-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path /home/rafi/Desktop/dsf.angular/node_modules/babel-plugin-transform-export-extensions/node_modules/babel-runtime/node_modules/core-js/modules/library/es6.object.to-string.js
npm ERR! code ENOSPC
npm ERR! errno -28
npm ERR! nospc ENOSPC, open '/home/rafi/Desktop/dsf.angular/node_modules/babel-plugin-transform-export-extensions/node_modules/babel-runtime/node_modules/core-js/modules/library/es6.object.to-string.js'
npm ERR! nospc This is most likely not a problem with npm itself
npm ERR! nospc and is related to insufficient space on your system.
npm ERR! Please include the following file with any support request:
Any idea what may be the problem here ?
Below is the error I keep getting. It seems to indicate a "post-install" issue with yodoctor. Sadly yodoctor is the advice given by the yeoman team to help with this issue. I have other node_modules installed (bower, grunt, typescript).
sh: yodoctor: command not found
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v5.0.0
npm ERR! npm v3.3.9
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! yo#1.5.0 postinstall: `yodoctor`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the yo#1.5.0 postinstall script 'yodoctor'.
npm ERR! This is most likely a problem with the yo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! yodoctor
npm ERR! You can get their info via:
npm ERR! npm owner ls yo
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jesselawson/.node_modules_global/lib/node_modules/npm-debug.log
This error is generally caused because someone used sudo at some point and messed up their npm package directory permissions. As a rule of thumb, never ever use sudo.
So how can you fix it? Here's a couple troubleshooting points:
Make sure you update npm to the latest version (npm install -g npm). npm 2.x had some race conditions that would try to run yodoctor before it is installed.
Make sure the global npm module folders is chown/chmod to your user.
Make sure npm module binaries is in your PATH.
If nothing works, then you can force install it by running npm i -g yeoman-doctor && npm i -g yo - but that really is a last recourse solution.
Just the following command would do the trick:
sudo npm install -g yo
if not, find where yo is, add it to the path as follows:
export PATH="$PATH:<path where yo is installed>"
I tried to install npm on my local machine (Mac OS) but when I run npm start, it keeps giving me this error with node_sass. Even when I run
sudo npm install node_sass
it doesn't fix the problem.
Error: You probably need to execute `npm install` to install brunch plugins.
Error: `/Users/AnhLe/bloc/anh-jams/node_modules/sass-brunch/node_modules/node-sass/bin/darwin-x64-v8-3.28/binding.node` is missing. Try reinstalling `node-sass`?
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.0
npm ERR! npm v2.7.3
npm ERR! code ELIFECYCLE
npm ERR! bloc-rdio-skeleton#0.0.1 start: `brunch watch --server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bloc-rdio-skeleton#0.0.1 start script 'brunch watch --server'.
npm ERR! This is most likely a problem with the bloc-rdio-skeleton package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! brunch watch --server
npm ERR! You can get their info via:
npm ERR! npm owner ls bloc-rdio-skeleton
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/AnhLe/bloc/anh-jams/npm-debug.log
Looked around and these people are experiencing a similar error due to binding.node missing from SASS.
https://github.com/dlmanning/gulp-sass/issues/185