Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
120
rated 0 times [  120] [ 0]  / answers: 1 / hits: 53199  / 2 Years ago, sun, december 19, 2021, 4:52:26

I have Ubuntu 12.10 running as a VMware guest on my Windows 8 host.



I have shared a folder on my Windows 8 Host and it is mounted in the Ubuntu guest on startup using this entry in fstab:



//myhost/work /work cifs credentials=/home/user/.smbcredentials,noserverino,nounix,uid=user,gid=user,file_mode=0777,dir_mode=0777 0 0 


The share works fine and is able to be served by a webserver such as nginx.



However, there seems to be issues when I install node.js packages using npm, I get a bunch of errors like this:



user@ubuntu:/work/test$ sudo npm install grunt
npm http GET https://registry.npmjs.org/grunt
npm http 304 https://registry.npmjs.org/grunt
...
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/work/test/node_modules/grunt/node_modules/lodash'
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/work/test/node_modules/grunt/node_modules/lodash']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/work/test/node_modules/grunt/node_modules/lodash' }
npm ERR! Error: UNKNOWN, symlink '../which/bin/which'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>

npm ERR! System Linux 3.5.0-26-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "grunt"
npm ERR! cwd /work/test
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! path ../which/bin/which
npm ERR! code UNKNOWN
npm ERR! errno -1
npm ERR! Error: ENOENT, chmod '/work/test/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>

npm ERR! System Linux 3.5.0-26-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "grunt"
npm ERR! cwd /work/test
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! path /work/test/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt
npm ERR! fstream_path /work/test/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (fs.js:93:15)
npm ERR! Error: ENOENT, lstat '/work/test/node_modules/grunt/node_modules/minimatch/test/basic.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>

npm ERR! System Linux 3.5.0-26-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "grunt"
npm ERR! cwd /work/test
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! path /work/test/node_modules/grunt/node_modules/minimatch/test/basic.js
npm ERR! fstream_path /work/test/node_modules/grunt/node_modules/minimatch/test/basic.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:93:15)
npm ERR! Error: ENOENT, lstat '/work/test/node_modules/grunt/node_modules/glob/test/00-setup.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
...
npm ERR! not ok code 0
user@ubuntu:/work/test$


What could be causing this problem? From the command line, I can chmod, rmdir among other things using sudo without any issues.


More From » permissions

 Answers
0

Running with --no-bin-links fixed it for me:


npm install --no-bin-links

--no-bin-links tells npm to not create any symbolic links.


Occasionally, for some packages that create symlinks even with the --no-bin-links directive, or in the case where using this directive causes other errors, you can remove the symlinks from the package(s) that is showing error with the command:


npm unlink <package>

There is definitely no way to translate symlinks to a Windows share.


[#32139] Monday, December 20, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zebrla

Total Points: 356
Total Questions: 110
Total Answers: 120

Location: Sudan
Member since Tue, Aug 3, 2021
3 Years ago
;