Rangeslider.js does not install - node.js

I am trying to install and use the rangeslider.js API, I have downloaded the latest version and I have gone about installing it via the terminal using both npm and bower install commands. When I try the npm install, i get the following error:
npm WARN checkPermissions Missing write access to /Users/Brian/node_modules
npm WARN enoent ENOENT: no such file or directory, open '/Users/Brian/package.json'
npm WARN Brian No description
npm WARN Brian No repository field.
npm WARN Brian No README data
npm WARN Brian No license field.
npm ERR! path /Users/Brian/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/Brian/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/Users/Brian/node_modules'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/Brian/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Brian/.npm/_logs/2017-06-30T20_40_33_877Z-debug.log
And when I try the bower install, I get this one:
bower cached https://github.com/andreruffert/rangeslider.js.git#2.3.0
bower validate 2.3.0 against https://github.com/andreruffert/rangeslider.js.git#*
bower no-json No bower.json file to save to, use bower init to create one
The last message on the bower install seems pretty clear, I need to create some sort of jSON file, but I have no idea what the requirements for it are and where I need to save it to. Can anyone help? Before you all suggest it: sudo install does not solve anything.

Related

Why can't I install anything with Node on my Mac OS Catalina

I've needed to install a number of things with node but ever since I updated my system to Catalina I just get errors that I'm assuming are due to the new security measures on Mac.
The last thing I tried to install was this command:
npm install -g gulp gulp-cli browser-sync
I got this error
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
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/jessiematias/.npm/_logs/2020-03-31T15_45_46_951Z-debug.log
How can I ensure I don't get these errors anymore whenever I try to install something on the command line? It's saying to try running the commmand again as root/Administrator. How do I do that?

Npm client looks like updated but does not update

[grexlin85:~] >sudo npm i -g npm#latest
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
+ npm#6.13.7
updated 1 package in 5.748s
[grexlin85:~] >npm -v
5.8.0
[grexlin85:~] >sudo npm -v
6.13.7
Hello, I've updated my npm but if I write sudo npm -v it looks like updated but does not update and the version is still same. What can I do?
--------Edit-------
[grexlin85:~] >npm i -g npm#latest
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/npm' }
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 (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/grexlin85/.npm/_logs/2020-02-03T07_50_54_366Z-debug.log
I've tried without sudo and i get this output

Vue-Cli won't install

I have node 11.2.0
Keep receiving this error.
Andrews-MacBook-Pro:vueTutorial aharris$ npm install -g #vue/cli
npm WARN deprecated hoek#5.0.4: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cross-spawn-async#2.2.5: cross-spawn no longer requires a build toolchain, use it instead
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN #apollographql/apollo-upload-server#5.0.3 requires a peer of graphql#^0.13.1 but none is installed. You must install peer dependencies yourself.
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
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 (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/aharris/.npm/_logs/2018-11-25T18_43_42_502Z-debug.log
You are facing the problem of file permissions.
-g parameter of npm means "globally", which will install those file in the system directory, specifically in your computer /usr/local/lib/node_modules, where the owner is possibly root and with permission rwxr-xr-x, means those who is not root will have no permission to write.
Then, you may use sudo to get this permission, or just like NPM modules won't install globally without sudo said, set the npm prefix into the path where you have permissions:
$ npm config set prefix '~/.npm-packages'
All you need to do is run the same command with sudo before it,
sudo npm install -g #vue/cli
and you'll be prompted for the admin password.

i can't install express in my package.json file in termux

I tried <code> npm install --save express </code> to install express in my package.json file and it gave me
/storage/emulated/0/swifttest
$ npm install --save express
npm WARN swifttest#1.0.0 No description
npm WARN swifttest#1.0.0 No repository field.
npm ERR! path ../express
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../express' -> '/storage/emulated/0/swifttest/node_modules/express'
npm ERR! { Error: EACCES: permission denied, symlink '../express' -> '/storage/emulated/0/swifttest/node_modules/express'
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, symlink '../express' -> '/storage/emulated/0/swifttest/node_modules/express'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../express',
I know it has to do with permission but i dont know my way around. I use Android 5.1
Run your npm install as root I.e sudo npm install --save express.
Thanks i did it. I figured i went through emulated instead of termux directory. I used data/data/files/home as against emulated i used earlier

Can not install Firebase CLI using npm

I first installed node and npm
Ahmads-MacBook-Pro:~ ahmadbazzi$ npm --version
5.6.0
Ahmads-MacBook-Pro:~ ahmadbazzi$ node --version
v8.9.4
Then i went to install the firebase CLI following the steps here https://firebase.google.com/docs/functions/get-started.
I first executed
Ahmads-MacBook-Pro:~ ahmadbazzi$ npm install -g firebase-tools
which gave me a whole bunch of warnings
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN checkPermissions Missing write access to /Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #google-cloud/functions-emulator#1.0.0-alpha.23 (node_modules/firebase-tools/node_modules/#google-cloud/functions-emulator):
npm WARN 404 SKIPPING OPTIONAL DEPENDENCY: Not Found: #google-cloud/functions-emulator#1.0.0-alpha.23
and a whole bunch of errors
npm ERR! path /Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools'
npm ERR! { Error: EACCES: permission denied, access '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools\'',
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/ahmadbazzi/.npm-global/lib/node_modules/firebase-tools' }`
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ahmadbazzi/path to npmrc folder/_logs/2018-01-23T17_29_19_771Z-debug.log
This worked for me:
sudo npm install -g firebase-tools
Apparently the installation requires superuser privileges, which you can request with sudo.
Try a variety of things:
Try repeatedly to uninstall and reinstall. Sometimes the problem can clear itself up.
npm uninstall -g firebase-tools; npm install -g firebase-tools
Check the specific permissions on the files in the error message. Do you have write access to them? If you don't, do you perhaps need to use sudo to write them?
Completely blow away the location where it's trying to install, which is apparently /Users/ahmadbazzi/.npm-global for you.
This worked for me, try:
npm i firebase --save --force

Resources