I'm trying to run npm install in a folder on my FAT32 drive, and this is the error I'm getting:
$ npm install
/work/sites/project
└── (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.8.0-27-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! path ../semver/bin/semver
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall symlink
npm ERR! Error: EPERM: operation not permitted, symlink '../semver/bin/semver' -> '/work/sites/project/node_modules/accord/node_modules/.bin/semver'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, symlink '../semver/bin/semver' -> '/work/sites/project/node_modules/accord/node_modules/.bin/semver'
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../semver/bin/semver',
npm ERR! dest: '/work/sites/project/node_modules/accord/node_modules/.bin/semver',
npm ERR! parent: 'accord' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /work/sites/project/npm-debug.log
npm ERR! code 1
$
So far I understand that the problem is caused by FAT32 not supporting symlinks and/or chmod. But is it really true that there's no work-around for this?
There is an issue open for this on GitHub, where maintainers agree that this is a bug and should be fixed, but the thread has been idle for over a year now.
Also in the same thread user mgiorgino mentions that npm install run under Windows does not make this error. I don't have a chance to confirm this, so is there anyone on Windows who was able to successfully run npm install on a FAT32 file system? If yes, is there any way that we get the same functionality under Linux?
Finally, looking around the web I found FAT32 file system driver and FAT16/FAT32 filesystem implementation packages. Since both their documentation is very scarce, so I can't tell if they can help fix this problem?
Try updating npm by running npm install npm#latest -g. I ran that command and it updated to v4.0.2. The recent updates could contain a fix if it is code related. Command in footer of the npm docs page.
Disabling symlinks helped a number of users when using npm install on systems unable to create symlinks.
To turn off npm using symlinks set bin-links to false in the npm config by running npm config set bin-links false. Optionally you can run npm install --no-bin-links each time. The first command makes the change to the npm config so you don't have to add the --no-bin-links flag each time you run npm install. This is the method recommended in the npm config docs to get npm working on systems/drives that don't support symlinks.
Related
I am trying to deploy my local development to GitHub and also let my Webserver pull from Github (which works fine).
I clone my Laravel Repository from Github to my Server. After that I run composer install (which works fine).
But when running npm install I get the following error:
npm ERR! Cannot read property 'length' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2017-11-12T14_48_59_351Z-debug.log
I checked the log file: it is empty.
Further, running other commands like npm help config throws this error:
npm ERR! file man
npm ERR! path man
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn man
npm ERR! enoent spawn man ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! enoent Check if the file 'man' is present.
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2017-11-12T14_49_57_777Z-debug.log
I just installed node and npm on my shared hosting via the command line.
npm -v results in 5.5.1
Any ideas how to solve this? Could this be an error within NPM?
EDIT
I tried several other node & npm versions and with node.js v7.10.1 and npm 4.2.0 at least npm install starts running. It then produces the following error (which brings me to the conclusion that I need a newser version of npm, but the newer versions throw the errors mentioned above):
└── vuejs-datepicker#0.9.19
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-98-generic
npm ERR! argv "node" "/node-v7.10.1-linux-x64/bin/npm" "install"
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mozjpeg#4.1.1 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mozjpeg#4.1.1 postinstall script 'node lib/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 mozjpeg package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mozjpeg
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mozjpeg
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /.npm/_logs/2017-11-12T15_23_08_709Z-debug.log
Any way I could come around this issue without installing a new npm version? That might help me, too. I am very grateful for any help.
Thank you!
I'm trying to do the react tutorial on my local machine (centOS)
I ran
sudo npm install -g create-react-app
After running that command I got the following error
npm ERR! Linux 3.10.0-514.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "create-react-app"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! path /tmp/npm-1422-84cdbe70/registry.npmjs.org/tar/-/tar-2.2.1.tgz
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open '/tmp/npm- 1422-84cdbe70/registry.npmjs.org/tar/-/tar-2.2.1.tgz' while getting shasum for /tmp/npm-1422-84cdbe70/registry.npmjs.org/tar/-/tar-2.2.1.tgz
npm ERR! From: https://registry.npmjs.org/tar/-/tar-2.2.1.tgz
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, open '/tmp/npm-1422-84cdbe70/registry.npmjs.org/tar/-/tar-2.2.1.tgz' while getting shasum for /tmp/npm-1422-84cdbe70/registry.npmjs.org/tar/-/tar-2.2.1.tgz
npm ERR! From: https://registry.npmjs.org/tar/-/tar-2.2.1.tgz
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: '/tmp/npm-1422-84cdbe70/registry.npmjs.org/tar/-/tar-2.2.1.tgz',
npm ERR! parent: 'tar-pack' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
I tried going into the directory and untarring the .tgz file and changing around some of the permissions and nothing worked. I followed some solutions online with similar problems but still no luck.
I also ran
npm cache clear
Can anyone explain why this is happening? Any suggestions?
Running npm cache clear or even npm cache clear -fdoes not always clean all the cache.
Sometimes you should remove the cache files manually.
To do so go to the default NPM cache folder and remove its content:
Default: ~/.npm on linux, or %AppData%/npm-cache on Windows.
Then you can attempt to install your desired package with npm install -g.
Please, avoid using sudo npm install -g because you can mess up the npm permissions. Instead change the permission to npm's default directory, or change npm's default directory to another directory. Further details here:
https://docs.npmjs.com/getting-started/fixing-npm-permissions
WARNING: If npm's default path is just /usr, changing the directory permissions will be harmful.
Try to use $: sudo npm install
I have tried to install angular cli with latest version of node as you mentioned. But it is unsuccessful. I have tried it with admin user only
FYI- I have tried it on another machine freshly there also it says the same
OS: windows7 64
node v7.9.0
npm: v4.2.0
error: EPERM: operation not permitted to rename package.json
C:\Windows\system32>npm install -g #angular/cli --save
C:\Users\001091\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\#a
ngular\cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
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" "install" "-g" "#angular/cli" "--save"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! path C:\Users\001091\AppData\Roaming\npm\node_modules\.staging\url-pars
e-e45d5bd3\package.json.1317145617
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\001091\AppData\
Roaming\npm\node_modules\.staging\url-parse-e45d5bd3\package.json.1317145617' ->
'C:\Users\001091\AppData\Roaming\npm\node_modules\.staging\url-parse-e45d5bd3\p
ackage.json'
npm ERR! { Error: EPERM: operation not permitted, rename 'C:\Users\001091\AppDa
ta\Roaming\npm\node_modules\.staging\url-parse-e45d5bd3\package.json.1317145617'
-> 'C:\Users\001091\AppData\Roaming\npm\node_modules\.staging\url-parse-e45d5bd
3\package.json'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\001091\\AppData\\Roaming\\npm\\node_modules\\.stagi
ng\\url-parse-e45d5bd3\\package.json.1317145617',
npm ERR! dest: 'C:\\Users\\001091\\AppData\\Roaming\\npm\\node_modules\\.stagi
ng\\url-parse-e45d5bd3\\package.json',
npm ERR! parent: '#angular/cli' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\001091\AppData\Roaming\npm-cache\_logs\2017-04-26T06_18_55
_108Z-debug.log
Unfortunately, the Angular CLI sometimes has some issues on Windows machines. Please have a look at the following thread for some possible solutions which I tried and worked: https://github.com/angular/angular-cli/issues/1349
Unable to find .angular-cli.DELETE file under C:\Users\\AppData\Roaming\npm\node_modules
hence I have deleted the entire node modules folder and did npm cache clear and then tried. it worked
I had the same issue, so I tried to install it using the node.js command prompt instead of the default one and it worked.
I hope it can help somebody else.
For me the problem was caused by running the npm install in Powershell. Running in a traditional command prompt fixed the issue.
Running Node command prompt as an administrator worked for me.
Try this (for mac users)
sudo chmod -R 777 <project-directory-name>
For example
sudo chmod -R 777 webProject1
I upgraded node.js and npm and did an npm install and now I'm getting the message below. The thing is, I have been working on the application for about a year and gulp-sass is installed (it's what I use to upgrade my sass files) so it is clearly do to the upgrade, but I'm not sure how to get everything to work again, sort of downgrading everything again.
$ ionic serve
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'gulp-sass'
Do you need to run `npm install`?
When I try npm install gulp-sass:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\gulp-minify-css\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\karma-junit-reporter\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\karma-mocha-reporter\package.json'
npm WARN rcreditsmobile#1.1.1 No repository field.
npm WARN rcreditsmobile#1.1.1 No license field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Users\\Public\\Programs\\nodejs\\node.exe" "C:\\Users\\Someone\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp-sass" "--save"
npm ERR! node v6.9.5
npm ERR! npm v4.2.0
npm ERR! path E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at moveAway (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:42:5)
npm ERR! at destStatted (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:31:7)
npm ERR! at C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at moveAway (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:42:5)
npm ERR! at destStatted (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:31:7)
npm ERR! at C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at Error (native) parent: 'rcreditsmobile' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Someone\AppData\Roaming\npm-cache\_logs\2017-02-11T01_17_29_643Z-debug.log
I found an answer on the ionic forum that works, the relevant part is below with a few modifications for clarity:
Just add this to your gulpfile.js
gulp.task('serve:before', ['default']);
That line tells the new ionic 2 client to run the old ionic 1.x client
'default' task before serving (before running ionic serve)
Also you need to add your ionic.config.json file this:
{
...
"app_id": "",
"v2": false,
"typescript": false,
"watch": {
"sass": ["scss/**/*.scss"],
"html": ["www/**/*.html"],
"livereload": [
"www/**/*.html",
"www/**/*.js",
"www/**/*.css"
]
}
...
}
Ref: https://forum.ionicframework.com/t/ionic2-cli-doesnt-run-gulp-tasks-on-ionic-serve/49085/7
I've encountered this problem before. What I've tried so far:
Reinstall the node.js. You may refer https://nodejs.org/en/download/
Run in command line: npm rebuild node-sass
Then try run ionic serve. Hope it helps you.
I'm going to install slamdata on debian Jessie, as described here, but I failed at npm install section and it wanted to install chromedriver. I even tried a mirror of chromedriver. Here is logs.
exec#mob-db1:/opt/slamdata$ npm install
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
chromedriver#2.23.1 install /opt/slamdata/node_modules/chromedriver
node install.js
Downloading http://chromedriver.storage.googleapis.com/2.23/chromedriver_linux64.zip
Saving to /tmp/chromedriver/chromedriver_linux64.zip
Receiving...
ChromeDriver installation failed undefined
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm ERR! Linux 4.2.8-1-pve
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! chromedriver#2.23.1 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver#2.23.1 install 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 chromedriver 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 chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/slamdata/npm-debug.log
exec#mob-db1:/opt/slamdata$ npm install chromedriver --chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into
npm and is now out of date with respect to npm
chromedriver#2.23.1 install /opt/slamdata/node_modules/chromedriver
node install.js
Downloading http://npm.taobao.org/mirrors/chromedriver/2.23/chromedriver_linux64.zip
Saving to /tmp/chromedriver/chromedriver_linux64.zip
Receiving...
ChromeDriver installation failed undefined
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm ERR! Linux 4.2.8-1-pve
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "chromedriver" "--chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! chromedriver#2.23.1 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver#2.23.1 install 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 chromedriver 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 chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/slamdata/npm-debug.log
I met it with 'yarn install' which info 'chromedriver: ChromeDriver installation failed Error with http'.So i try to install chromedriver before 'yarn install'.
And then solve it.
https://www.npmjs.com/package/chromedriver
If you are not able to install chrome driver through npm, use the binary files of chrome driver. Make sure you download the same version binary file as that of your chrome browser.
Go to: https://chromedriver.chromium.org/
This will give you an exe file.
Put this file in user/AppData/Roaming/npm directory.
set this to PATH environment variables.
Thats it! You are done :)