Skip to main content

Questions tagged [npm-scripts]

The "scripts" property of the package.json file supported by npm.

0 votes
0 answers
34 views

Changing the "main" in package.json for one specific (expo) script

I have a simple react-native library and I am trying to make it so that I can easily test the code locally. I am using expo for local tests, and the input file for testing with expo is index.js. ...
The Blind Hawk's user avatar
0 votes
0 answers
19 views

What is a good way to prevent file getting renamed when running npm run build

I am running npm run build for production and this is my script code. "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview", "lint": "eslint . --ext .vue,.js,...
Shinzie's user avatar
  • 15
0 votes
0 answers
45 views

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-prefix.js'

i recently installed nodejs on my laptop running on win 11 . node -v ran perfectly . but tried running the script npm --version its showing this error PS C:\Users\saikat mandal> node Welcome to ...
SAIKAT MANDAL's user avatar
-1 votes
0 answers
17 views

issue in using bootstrap in vscode

npm: The term 'npm' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct ...
Mohit Kumar's user avatar
0 votes
1 answer
34 views

WebStorm IDE 'Run script' runs npm but doesn't successfully execute .js file

New to Node, trying to follow a basic tutorial to launch a web browser. I'm using WebStorm as my IDE with node v22.3.0 and npm v10.8.1 and both commands are recognized by the terminal. The scripts ...
klex52s's user avatar
  • 437
3 votes
2 answers
185 views

Running npm run dev shows an error called 'The requested scope is invalid, unknown, or malformed.'

I'm learning how to create apps on Shopify and need some help. Whenever I run, npm run dev and click any key, it shows this even though I'm already logged in to Shopify. npm run dev > dev > ...
Jey-Es's user avatar
  • 43
-1 votes
1 answer
69 views

NodeBB installation: SyntaxError: Unexpected token?

https://docs.nodebb.org/installing/os/ubuntu/ I am following the NodeBB documentation(link attached above) to setup nodeBB locally on my machine - However, I am stuck at "Installing nodeBB" ...
Pravallika Nakarikanti's user avatar
0 votes
0 answers
159 views

npm is not working and the version is also not showing in vs code

PS C:\Users\USER\OneDrive\Desktop\New folder (3)> npm --version node:internal/modules/cjs/loader:1148 throw err; ^ Error: Cannot find module 'C:\Users\USER\AppData\Roaming\npm\node_modules\npm\bin\...
Koushik Masanta's user avatar
1 vote
0 answers
92 views

Npm is not starting 'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-prefix.js"'

Please suggest below error for npm start PS C:\JsonServerSetup> npm start start json-server --watch db.json --port 8000 npm error code ENOENT npm error syscall spawn C:\Program Files\nodejs npm ...
Gaurav tyagi's user avatar
0 votes
0 answers
65 views

Lifecycle script 'build' failed with errors: npm build error

error message I am getting this error not sure why ? In morning when I created build it was working and in afternoon I was facing this issue. while I run npm build first time I saw texted that npm ...
Divyesh's user avatar
0 votes
0 answers
17 views

Asking npm cli for react-intl library when doing message extraction

I am new to npm script and react-intl. In our current project, npm script for react-intl is defined like the following way on package.json to do the message extraction. { "script": { "...
Che.P's user avatar
  • 79
0 votes
0 answers
11 views

start nodejs server in debug mode with npm script

I want a npm script that starts my index.js server in debug mode. I will run this script from outside the folder of the server with a tasks.json command. My last attempt: "scripts": { "...
Péter Magyar's user avatar
-2 votes
4 answers
198 views

How to know if my node module is being installed in dev mode or in dependency mode

There are two different situations where you run npm install: You run npm install in your project's root directory Someone added your module as a dependency of their own project and they run npm ...
ptvty's user avatar
  • 5,596
0 votes
0 answers
14 views

npm : Unable to Recognize "npm" as a Cmdlet, Function, Script File, or Executable Program in VSCode

I am trying to run the 'npm run serve' command in Visual Studio Code's integrated terminal on my Windows machine. However, I am encountering an issue where I am receiving an error that states: npm : ...
happyinn's user avatar
1 vote
1 answer
92 views

npm install fails with 'ENOENT: no such file or directory, mkdir' error

` PS F:\our company\Triyotech India\client> npm i npm ERR! code ENOENT npm ERR! syscall mkdir npm ERR! path \? npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, mkdir '\?' npm ...
Er SP's user avatar
  • 31

15 30 50 per page
1
2 3 4 5
72