When I run
% npm install composer
I receive:
+ composer#4.1.0
updated 1 package and audited 901678 packages in 9.221s
37 packages are looking for funding
run `npm fund` for details
found 9 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
However, when I run:
% composer -v
I receive:
zsh: command not found: composer
Add composer vendor bin path manually in .zshrc
export PATH="$PATH:$HOME/.composer/vendor/bin"
OR
make a symlink in the /usr/local/bin
OR
Please run this brew install composer
Related
I try to do a nuxt app with expressjs but it doesn't work.
When I try to install express it says that there are 15 high vulnerabilities, then I do the command npm audit fix, then npm audit fix --force which makes errors disappear.
But now when I do a npm run dev it doesn't work.
npm install express
up to date, audited 1472 packages in 3s
151 packages are looking for funding
run `npm fund` for details
15 high severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
--
npm run build
> Tomatoes#1.0.0 build
> nuxt build
Nuxi 3.0.0 15:58:00
Nuxt 3.0.0 with Nitro 1.0.0 15:58:00
ERROR Cannot read properties of undefined (reading 'options') 15:58:01
at axiosModule (node_modules/#nuxtjs/axios/lib/module.js:12:13)
at installModule (node_modules/#nuxt/kit/dist/index.mjs:416:9)
at async initNuxt (node_modules/nuxt/dist/index.mjs:1825:7)
at async loadNuxt (node_modules/nuxt/dist/index.mjs:1857:5)
at async loadNuxt (node_modules/#nuxt/kit/dist/index.mjs:493:19)
at async Object.invoke (node_modules/nuxi/dist/chunks/build.mjs:34:18)
at async _main (node_modules/nuxi/dist/cli.mjs:50:20)
I cannot install rdme. I have correctly installed Node.js:
grafeno30#linux:~$ npm -v
8.11.0
grafeno30#linux:~$ node -v
v16.16.0
and when I execute npm install rdme I get the the following message:
up to date, audited 377 packages in 888ms
82 packages are looking for funding
run `npm fund` for details
5 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
I execute the following command: npm audit fix --force
If I execute rdme on the screen appears "command not found".
Navigate to your "node modules" folder in nodejs and try running
npm i rdme#version
eg- npm i rdme#8.0.0-beta.2
Thank you #jonrsharpe
I have been able to run it with npx.
I have able to execute with npx.
I didn't read all the documentation:
Once installed in your project, we recommend using npx (which is included if you have npm installed) to prefix all of your CLI commands. For example:
npx rdme validate [file]*
It seems I have a path error, I can see proof the package installed, and I've tried it both globally and local, tried both with and w/o the -cli suffix, but zshell keeps complaining command not found
dr_frankenmiller#Bryans-MacBook-Pro ~ % npm install ganache-cli
npm WARN deprecated ganache-cli#6.12.2: ganache-cli is now ganache; visit https://trfl.io/g7 for details
added 1 package, and audited 102 packages in 11s
2 packages are looking for funding
run npm fund for details
9 vulnerabilities (8 moderate, 1 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run npm audit for details.
dr_frankenmiller#Bryans-MacBook-Pro ~ % npm ls --depth=0
dr_frankenmiller# /Users/dr_frankenmiller
└── ganache-cli#6.12.2
dr_frankenmiller#Bryans-MacBook-Pro ~ % ganache-cli
zsh: command not found: ganache-cli
I might have done something bad, using a sudo rm -rf node_modules command to uninstall the package, was that dangerous to do? I reinstalled it globally and then tried running it again, and then zshell started complaining I wasn't authorized to run ganache. I tried the command sudo ganache, it asked me for password, and then responded again that command not found.
Can someone help me get back on track with my tutorial?
According to Ganache-CLI's instructions, it should be installed with:
npm install ganache-cli -g
I'd recommend installing the latest Ganache version rather than installing Ganache-CLI, though. Ganache-CLI is deprecated. Use
npm uninstall ganache-cli && npm install ganache -g
Ganache v7.0.0 and onward can be used in the CLI as well as programatically.
On another note, I strongly recommend against using sudo when installing anything via npm. This can give untrusted code the ability to run as admin on your system. Definitely a big security risk.
Just a follow up on difficulties I was having, I ended up using yarn to download and run ganache (MINUS the -cli suffix, -cli suffix now deprecated), yarn install ganache --global to install and then yarn ganache to run (no -cli necessary)
Here's how I found the solution for my specific use case. The bug came about when I was attempting to run a brownie deployment script. Run npm uninstall ganache-cli then run yarn global add ganache. Worked like a charm.
I am installing some packages on NPM, sometimes I have to write -s and -g? What do they mean?
npm install -s socket.io
npm install -g xxxxxxx
npm -g <package> will install a package globally on your machine. Without the -g or --global flag, the package will be installed locally in the directory you were in when you ran the command.
npm -S <package> with an uppercase -S or --save will install the package and save it to your dependencies in your package.json, although I believe that is now the default behavior in current npm. I recommend reading the docs if you're unfamiliar with what's happening when you pass different options to npm.
#gmmetheny answered the question about the global -g flag, but -s appears to silence the output of the command (at least in npm v7.0.15).
In other words, including -s (or --silent) in your npm install command means that it will have no output (only a newline):
> npm install -s example-package1 example-package2
This may be useful for running the command in a script.
Running the command without the -s flag echoes information about what was installed, e.g.:
> npm install example-package1 example-package2
npm WARN deprecated some-pkg#1.2.3: this library is no longer supported
added 160 packages, and audited 160 packages in 6s
14 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
You can diff the resulting directories created after running each variant of the command and you can verify that the effects are the same.
As #Max mentioned, this option is NOT mentioned in the npm docs (at least not in any prevalent location where a user might find it after a reasonable amount of searching).
I am having problems with npm and babel/core/
I can't install the demo app from https://github.com/jakearchibald/wittr
$ git clone https://github.com/jakearchibald/wittr
$ npm install
I get
added 1053 packages from 526 contributors and audited 6107 packages in 29.719s
found 33 vulnerabilities (15 low, 17 high, 1 critical)
run npm audit fix to fix them, or npm audit for details
npm install --save-dev gulp#4.0.0 ws#6.0.0 browserify#16.2.3 babelify#10.0.0 gulp-babel#8.0.0 gulp-handlebars#5.0.2 handlebars#4.0.12 gulp-load-plugins#1.5.0 lodash#4.17.11
npm WARN babelify#10.0.0 requires a peer of #babel/core#^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN gulp-babel#8.0.0 requires a peer of #babel/core#^7.0.0 but none is installed. You must install peer dependencies yourself.
+ gulp-handlebars#5.0.2
+ babelify#10.0.0
+ gulp-babel#8.0.0
+ gulp#4.0.0
+ handlebars#4.0.12
+ gulp-load-plugins#1.5.0
+ ws#6.0.0
+ browserify#16.2.3
+ lodash#4.17.11
added 120 packages from 91 contributors, removed 143 packages, updated 54 packages and audited 10195 packages in 13.062s
found 4 vulnerabilities (3 low, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details
I got all the vulnerabilities down to just 1 high and 3 low. But npm run serve isn't working
I am running node 10.10.2 which is way above the recommended dependency of 0.12.7 so that should not be a problem
I'm using npm version 6.4.1
The package.json file is here
Any help would be greatly appreciated,
Thanks
Try installing Babel 7, It should work
$ npm install --save-dev babelify #babel/core
I had the same issue, as you can see in the below image
After installing
Click on this for further information
babelify