i'm learning Vue.JS and i need to install Vue CLI.
NodeJS : v13.8.0
Vue CLI : v4.2.2
I installed NodeJS without problems but when i go to my folder on terminal and install Vue CLI with (npm install -g #vue/cli) i got a lot of errors.
MacBook-Pro-de-Cedric:excli cedric$ npm install -g #vue/cli
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/#vue/cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/#vue/cli/node_modules
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/#vue
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules/#vue/cli
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/#vue/cli'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/#vue/cli'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules/#vue/cli'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/#vue/cli'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/cedric/.npm/_logs/2020-02-09T15_09_00_595Z-debug.log
I can create a project via terminal with: (vue create nameofproject) but it also contains error and i can't lauch npm run serve
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/cedric/Documents/Projets Site Web : Apps/VueJs/excli/projet/node_modules/fsevents
gyp ERR! node -v v13.8.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
Successfully created project projet.
Get started with the following commands:
$ cd projet
$ npm run serve
MacBook-Pro-de-Cedric:excli cedric$ npm run serve
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/cedric/Documents/Projets Site Web : Apps/VueJs/excli/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/cedric/Documents/Projets Site Web : Apps/VueJs/excli/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/cedric/.npm/_logs/2020-02-09T15_18_01_082Z-debug.log
If someone know how i can fix that it would be veryyy nice.
Thanks
If you are on mac then try sudo npm install -g #vue/cli instead of npm install -g #vue/cli for the global installation.
It's since the path of Node module has been missed, you can just type sudo npm install -g #vue/cli to install Vue, which means install vue under the global environment, either you can re-set your node module path.
You have to execute npm install -g with superuser right (with sudo for exemple on linux) because it seems like your npm's directory is under superuser right.
You can also change the npm's default directory
Related
I want to install mechanic on my nginx server.
I got this error when I execute sudo npm install -g mechanic:
tigaron#galaxybrainpower:/var/www/tigaron$ sudo npm install -g mechanic
/usr/bin/mechanic -> /usr/lib/node_modules/mechanic/bin/mechanic
> fs-ext#2.0.0 install /usr/lib/node_modules/mechanic/node_modules/fs-ext
> node-gyp configure build
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/tigaron/.cache/node-gyp/10.20.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/mechanic/node_modules/fs-ext/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/mechanic/node_modules/fs-ext/.node-gyp'
gyp ERR! System Linux 4.15.0
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/lib/node_modules/mechanic/node_modules/fs-ext
gyp ERR! node -v v10.20.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fs-ext#2.0.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fs-ext#2.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/tigaron/.npm/_logs/2020-05-24T06_29_26_857Z-debug.log
What is happening here? How to fix this error and proceed with the installation?
This answer solved the same issue I had when installing a different package.
Apparently the nobody user is used when building packages globally, but the directories are owned by root so it fails permissions. Configuring npm to use root with the following command is what the answer recommends.
npm -g config set user root
I'm trying to view someone else's Meteor project from Github. I cloned it then tried running it by typing 'meteor' but what results is this slew of errors. I've included a sample below. I am running the command prompt as administrator. Clearly this has something to do with Node or its packages but I'm at a loss of where I should go with this. If someone could give me a hint I would be grateful.
npm http GET https://registry.npmjs.org/camelcase
npm http GET https://registry.npmjs.org/map-obj
npm http 304 https://registry.npmjs.org/mime-db
npm http GET https://registry.npmjs.org/get-stdin
npm http GET https://registry.npmjs.org/repeating
npm http 304 https://registry.npmjs.org/async
etc. etc....
npm ERR! error rolling back errno: 50,
npm ERR! error rolling back code: 'EPERM',
npm ERR! error rolling back path:
'C:\Users\Kyle\Documents\Websites...
npm ERR! 'Object.oncomplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command
"C:\Users\Kyle\AppData\Local\.meteor\packages\meteor-tool\1.1.10\mt-os.windows.x86_32\dev_bundle\bin\\node.exe"
"C:\Users\Kyle\AppData\Local\.meteor\packages\meteor-tool\1.1.10\mt-
os.windows.x86_32\dev_bundle\bin\node_modules\npm\bin\npm-cli.js"
"install"
npm ERR! cwd
C:\Users\Kyle\Documents\Websites\thisWebsite\packages\npm-container.npm\package-new-14v2dj3
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
C:\Users\Kyle\AppData\Local.meteor\packages\meteor-tool\1.1.10\mt-os.windows.x86_32\dev_bundle\bin\node_modules\npm\node_modules\fstream\lib\writer.js:305:19
npm ERR! fstream_type Directory npm
ERR! fstream_class DirWriter
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error:
EPERM, mkdir
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.9
npm ERR! path...
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR!
Error: version not found: ansi-styles#2.2.0
npm ERR! at
C:\Users\Kyle\AppData\Local.meteor\packages\meteor-tool\1.1.10...
npm ERR! at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues
npm ERR! System Windows_NT 6.2.9200
npm ERR! command
"C:\Users\Kyle\AppData\Local\.meteor\packages\meteor-tool\1.1.10\mt-os.windows.x86_32\dev_bundle\bin\\node.exe"
Try running the CMD / Powershell with Administrator (Run as Administrator). and then install npm dependencies as Github usually don't store them do: npm install and npm start. If you keep getting the errors. go to C:\Program Files\nodejs\node_modules\
or where your nodejs is installed and do right click, choose 'Properties' and go to 'Security' tab and give privileges to the user you need and try running npm install. Good luck
This worked in my particular case:
Remove meteorhacks and npm-container by typing this in the console:
meteor remove meteorhacks:npm npm-container
Delete the 'npm-container' folder which is generated by the package.
Run 'npm init' to create a package.json
Copy the contents of packages.json to the dependencies section of package.json
Right now, I'm trying to get Telescope to run locally on my Mac. I go through all the steps, but once I type in
meteor
in terminal, this is what I get:
=> Started proxy.
=> Started MongoDB.
fast-render: updating npm dependencies -- connect...
npm ERR! Error: EACCES, open '/Users/Justin/.npm/inherits/2.0.1/package/package.json'
npm ERR! { [Error: EACCES, open '/Users/Justin/.npm/inherits/2.0.1/package/package.json']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/Justin/.npm/inherits/2.0.1/package/package.json',
npm ERR! parent: 'readable-stream' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.3.0
npm ERR! command "/Users/Justin/.meteor/tools/cef2bcd356/bin/node" "/Users/Justin/.meteor/tools/cef2bcd356/bin/npm" "install" "connect#2.13.0"
npm ERR! cwd /Users/Justin/.meteorite/packages/fast-render/arunoda/meteor-fast-render/149984b1aff3a5642a270aff9bd9006872c8302e/.npm/package-new-26ztfl
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /Users/Justin/.npm/inherits/2.0.1/package/package.json
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/Justin/.npm/inherits/2.0.1/package/package.json'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/Justin/.meteorite/packages/fast-render/arunoda/meteor-fast-render/149984b1aff3a5642a270aff9bd9006872c8302e/.npm/package-new-26ztfl/npm-debug.log
npm ERR! not ok code 0
=> Errors prevented startup:
While building package `fast-render`:
error: couldn't install npm package
While building package `telescope-tags`:
error: no such package: 'iron-router'
While building package `telescope-search`:
error: no such package: 'iron-router'
Any help would be great. Thanks.
This worked for me: https://github.com/meteor/meteor/issues/893
From the post:
"Looking in my .meteor/local directory, I saw that .meteor/local/build was owned by root instead of my normal user. Running a sudo rm -r build from within .meteor/local fixed the problem."
I am trying to get to grips with AngularJS, NodeJS and Ruby on Rails. When trying to install npm packages like yeoman, grunt etc. I receive an error in my Terminal which I have listed below:
npm ERR! Error: EACCES, open '/Users/Jabane/.npm/glob/3.2.11/package/package.json.25961'
npm ERR! { [Error: EACCES, open '/Users/Jabane/.npm/glob/3.2.11/package/package.json.25961']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/Jabane/.npm/glob/3.2.11/package/package.json.25961',
npm ERR! parent: 'browserify' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "browserify"
npm ERR! cwd /Users/Jabane
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.16
npm ERR! path /Users/Jabane/.npm/glob/3.2.11/package/package.json.25961
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/Jabane/.npm/glob/3.2.11/package/package.json.25961'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/kJabane/npm-debug.log
npm ERR! not ok code 0
What might be the issue in this case? Your assistance is highly appreciated.
Thanks
This is a permissions issue. You need to prefix your npm install command with sudo, e.g.:
sudo npm install yeoman
It will prompt you for your User Account's password; and subject to the correct password being provided, will then install the packages correctly.
I get an error when trying to install gruntjs on a linux 12.04 (with a mirrored packages source)
Here is the error:
sudo npm install -g grunt-cli
npm ERR! Error: ENOENT, open '/home/havetl/.npm/d63f3d0b-grunt-cli.lock'
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! <npm-#googlegroups.com>
npm ERR! System Linux 3.5.0-23-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "grunt-cli"
npm ERR! cwd /home/havetl
npm ERR! node -v v0.10.18
npm ERR! npm -v 1.3.8
npm ERR! path /home/havetl/.npm/d63f3d0b-grunt-cli.lock
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.5.0-23-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "grunt-cli"
npm ERR! cwd /home/havetl
npm ERR! node -v v0.10.18
npm ERR! npm -v 1.3.8
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/havetl/npm-debug.log
npm ERR! not ok code 0
Thanks for any idea!
According to the maintainer of npm, installing packages with sudo is considered bad practice because you are allowing that package to have complete control of your system and you can't and SHOULDN'T trust these packages with root access. Think Debian's long release cycles as an extreme example of protecting end users from community maintained packages for this exact reason.
http://howtonode.org/introduction-to-npm
You should do what Issaacs suggests and chown your /usr/local folder so you have RW permissions.
I've had this problem before; sometimes for global packages your current working directory has to be ~/ (but I'm not sure why this is!). Try:
cd ~/; sudo npm install -g grunt-cli
This blog worked for me :
http://slopjong.de/2012/10/31/how-to-install-the-latest-nodejs-in-ubuntu/
the error was because in ubuntu v12 few of the dependencies were not available for the latest version of Node.