Questions tagged [npm-cli]

The tag has no usage guidance.

npm-cli
Filter by
Sorted by
Tagged with
-3 votes
0 answers
19 views

package.json Just creates a file not Execute

This is my add-cli.js #!/usr/bin/env node // Extracting the command line arguments const args = process.argv.slice(2); // Function to add numbers function addNumbers(numbers) { return numbers....
noobVed's user avatar
0 votes
1 answer
101 views

cannot find the module

throw err; ^ Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) ...
Devipriya T D's user avatar
1 vote
0 answers
29 views

How to add npm keywords without publishing?

I just added some keywords to my package.json file for my package on npm. Is it possible to make npm show these updates without publishing a new version? I think doing npm patch for a simple change ...
Shahriar's user avatar
  • 2,159
1 vote
1 answer
173 views

npm v9.4.0 is known not to run on Node.js v19.5.0

I somehow broke npm on my Windows system. Any (literally any) npm command I use gives me the following illogical error: ERROR: npm v9.4.0 is known not to run on Node.js v19.5.0. You'll need to upgrade ...
user2447067's user avatar
0 votes
1 answer
233 views

Is there a way to have NPM CLI use custom protocols?

Is there a way to have npm CLI to use custom protocols? ... "dependencies": { ... "common-resource-1": "git+codecommit::us-east-1://common-resource-1#develop", ...
user2517182's user avatar
  • 1,289
2 votes
0 answers
43 views

Why NPM CLI creates two identical tokens?

I was trying the NPM cli and I ran 2 times the command npm create token --read-only after having logged in. The result is that now I have 2 completely identical tokens that I'm not able to manage, ...
Ale TheFe's user avatar
  • 1,631
0 votes
1 answer
490 views

npx npm_config_yes=true or --yes not working as expected and npx still requires confirmation for installation

tried npm_config_yes=true tried --yes and I still get requires confirmation for installation context: $ npm -v 8.11.0 $ node -v v16.15.1 Any workaround is appreciated also
eKelvin's user avatar
  • 923
4 votes
1 answer
1k views

npm 8.5.5: unexected token in @npmcli\arborist

after upgrading npm (via nvm) to 8.5.5 npm commands do not work anymore: e.g. npm --verbose ls webpack fails with: npm verb stack C:\Users\marti\AppData\Roaming\nvm\v16.15.0\node_modules\npm\...
TmTron's user avatar
  • 18.2k
2 votes
2 answers
3k views

NPM login to GitHub registry requires lowercase username

I'm trying to log in from the command line using this command: $ npm login --registry=https://npm.pkg.github.com/ But my username on GitHub has an uppercase first letter, which results in the ...
o01's user avatar
  • 5,335
0 votes
1 answer
322 views

"/" is not recognized as an internal or external command

Today, I'm coding a few npm packages and a few things that need to be prepared repeatedly. So I wanted to code a CLI to get those things done quickly. Here is the src/cli.js code: export function cli(...
Canh Nguyen's user avatar
14 votes
1 answer
5k views

NPM - Questions about `Email: (this IS public)`

I've configured the email address on npmjs.com, why does the cli keep prompting me to enter email? $ npm login npm notice Log in on https://registry.npmjs.org/ Username: wenfangdu Password: Email: (...
Wenfang Du's user avatar
2 votes
0 answers
194 views

Where NPM Install output goes? I cannot find it in stdout nor stderr

I am trying to get the output of the command npm install and show it in my cli module. But I am getting only the result at the end, not the loading output with the progress bar. Is maybe npm outputing ...
47ndr's user avatar
  • 603
0 votes
1 answer
222 views

node js cli STDOUT STDERR output exec and spawn commands

I am looking for a clear answer on how the stdout and stderr work when developing a npm cli module. I would like to print out everything exactly as it is when I run command with child_process.spawn. I ...
47ndr's user avatar
  • 603
0 votes
1 answer
153 views

Docker is "too verbose" in npm-cli-adduser

When my Dockerfile does the RUN command: RUN npm-cli-adduser -r https://$PRIVATE_REPOSITORY_URL/repository/npm-read -u $PRIVATE_USERNAME -p "$PRIVATE_PASSWORD" -e [email protected] ...
sheepiiHD's user avatar
  • 421
7 votes
1 answer
3k views

NPM outdated command not showing full list

When I do on my terminal: npm outdated -g I get a list of global packages that have updates available, and that's fine: Package Current Wanted Latest Location create-next-app 10....
Or Assayag's user avatar
  • 6,000
1 vote
1 answer
1k views

I got path error : [module not found] whenever I try to run any npm related command in VS Code

Whenever I try to run any npm related command such as npm -v or npm install , it gives me the error: From the screenshot, you can see that it is trying to navigate to find the module but the module ...
Ibad Shaikh's user avatar
  • 3,144
1 vote
2 answers
92 views

Unable to install npx [email protected] nucampsite

As instructed by my school, I was trying to install "npx [email protected] nucampsite" but it opens up visual studio code with the file npm-cli.js I tried running the command from ...
Jay Pirani's user avatar
0 votes
0 answers
405 views

Data path ".builders['app-shell']" should have required property 'class' when i was trying to use firebase with angular i got this error

Schema validation failed with the following errors: Data path ".builders['app-shell']" should have required property 'class'. Error: Schema validation failed with the following errors: Data ...
Manoj Jha's user avatar
1 vote
2 answers
179 views

Good way to install exact dependency globally

For the Node.js world, we can use NVM to switch between Node.js versions, and also switch out which global packages are in scope (in the $PATH). However, what if I want to ensure that I use ...
Alexander Mills's user avatar
21 votes
2 answers
7k views

How do I resolve npm audit returning ENOAUDIT: Your configured registry does not support audit requests?

This recently broke and I do not know what I might have done to break it beyond adding some additional dependencies. I am using https://registry.npmjs.org/ (the default). The relevant portion of the ...
ChiralMichael's user avatar
0 votes
0 answers
1k views

npm install and ng serve command not working despite having npm and proper path set up

I have all the required packages to run node and angular app. Everything was working fine and out of nowhere all hell broke loose. Now, when I try to run npm install to install all the dependencies of ...
Pritam Bohra's user avatar
  • 4,189
20 votes
7 answers
43k views

how to run node / babel script directly in command line?

My package.json looks like: { "name": "99-nodetest", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1"...
joedotnot's user avatar
  • 5,000
0 votes
1 answer
56 views

where should I store personal data for npm package?

For example, I have a npm package which is a cli-tool. Users should set their yahoo email and password first before using the functionalities. My question is where should I store the personal data? Is ...
zzzgoo's user avatar
  • 2,123
0 votes
2 answers
156 views

Why is npm passing cmd line flags directly to my script?

I'm using npm to run a build and I'm trying to override my .npmrc config options using cmd line flags. However npm insists on passing these flags directly to my script rather than reading them as ...
Cliff's user avatar
  • 10.9k
0 votes
1 answer
535 views

run exec command as admin in MsBuild

I need to run the command npm cache clean --force as admin in my daily builds. I am currently using the command: <Exec Command="npm cache clean --force" workingDirectory="$(SolutionRoot)\Angular" ...
Deepanshu Kalra's user avatar
1 vote
2 answers
515 views

Error installing Express via nodejs

I'm trying to install express via nodeJS and the errors that I am getting tell me that I should rename my directories. I have already run npm init in my project folder so I assume the setup is correct....
Nayman Leung's user avatar
57 votes
3 answers
43k views

Are there npm version prerelease identifiers?

There is a very handy npm version command. Besides arguments like major, minor and patch it accepts arguments like prerelease, prepatch, etc. It says in the docs that the commands work in accordance ...
timetowonder's user avatar
  • 5,251
2 votes
3 answers
5k views

How to call npm version (to update my own package's version and then commit)

Nothing happens when I run npm version minor -m "test" As a note, there is output if I run npm version without any arguments: $ npm version { 'my-app': '0.7.0', npm: '4.2.0', ares: '1.10.1-DEV',...
jmilloy's user avatar
  • 8,085
1 vote
1 answer
621 views

Node-sass creates extra files in watch mode

I import all my SCSS styles into a index.scss file using @import. This works fine when I build css manually using npm run build-css: "scripts": { //Other scripts "build-css": "node-sass src/...
JSNinja's user avatar
  • 705
85 votes
6 answers
44k views

list all globally installed modules with one command in ubuntu

I'm working on ubuntu 14.04, Is there any way to print all global modules (installed using npm) to the command line. How can I do this?
Muhsin Keloth's user avatar