1
votes

I'm trying to install the grunt package inside a shared Vagrant folder on OSX that is synced via nfs on a virtual Ubuntu 14.04 machine.

$ npm install grunt
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! tar.unpack untar error /home/vagrant/.npm/abbrev/1.0.9/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/dateformat/1.0.2-1.2.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/colors/0.6.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/inherits/1.0.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/nopt/1.0.10/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/inherits/2.0.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/lru-cache/2.7.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/async/0.1.22/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore.string/2.4.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/getobject/0.1.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/exit/0.1.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash/2.4.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/eventemitter2/0.4.14/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore.string/2.3.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/grunt-legacy-log-utils/0.1.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/graceful-fs/1.2.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/hooker/0.2.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/grunt-legacy-log/0.1.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/iconv-lite/0.2.11/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash/2.4.2/package.tgz
npm WARN install:[email protected] EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/lodash-e740bce0/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore.string/2.3.3/package.tgz
npm WARN install:[email protected] EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/underscore.string-478f4497/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash/2.4.2/package.tgz
npm WARN install:[email protected] EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/lodash-066a8478/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/lodash/0.9.2/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/rimraf/2.2.8/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/sigmund/1.0.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/minimatch/0.2.14/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/glob/3.1.21/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/minimatch/0.3.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/glob/3.2.11/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/findup-sync/0.1.3/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore/1.7.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/which/1.0.9/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/argparse/0.1.16/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/underscore.string/2.2.1/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/grunt-legacy-util/0.2.0/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/grunt/0.4.5/package.tgz
npm ERR! tar.unpack untar error /home/vagrant/.npm/esprima/1.0.4/package.tgz
npm WARN install:[email protected] EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/esprima-8320b64c/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/coffee-script/1.3.3/package.tgz
npm WARN install:[email protected] EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/coffee-script-fbff1893/package.json'
npm ERR! tar.unpack untar error /home/vagrant/.npm/js-yaml/2.0.5/package.tgz
npm WARN install:[email protected] EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/js-yaml-0f65429b/package.json'
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "grunt"
npm ERR! node v5.11.1
npm ERR! npm  v3.8.6
npm ERR! path /home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall utime

npm ERR! Error: EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, utime '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json']
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'utime',
npm ERR!   path: '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json',
npm ERR!   fstream_finish_call: 'utimes',
npm ERR!   fstream_type: 'File',
npm ERR!   fstream_path: '/home/vagrant/Code/bulbthings/Frontend/Angular3/node_modules/.staging/abbrev-f598728e/package.json',
npm ERR!   fstream_class: 'FileWriter',
npm ERR!   fstream_stack:
npm ERR!    [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:306:21',
npm ERR!      'FSReqWrap.oncomplete (fs.js:82:15)' ],
npm ERR!   parent: 'BulbThings' }
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!     /home/vagrant/Code/bulbthings/Frontend/Angular3/npm-debug.log

Full npm-debug.log

I've tried running npm cache clean and deleting the node_modules folder before running it again, with the same error.

I used puphpet to generate the vagrant machine.

Here is the config.yaml used by puphpet and the Vagrantfile

How do I fix this?

1
did you try sudo as its suggested in the errorFrederic Henri
Same error when trying to run it with sudoMastergalen

1 Answers

0
votes

Found a way to resolve this by using the default file driver in vagrant for synced folders, instead of NFS, although this does make it a lot slower on OSX.

Changed

synced_folder:
            vflsf_2ll1rv82p2ge:
                source: ~/Code
                target: /home/vagrant/Code
                sync_type: nfs

to

synced_folder:
            vflsf_2ll1rv82p2ge:
                source: ~/Code
                target: /home/vagrant/Code
                sync_type: default