All Questions
Tagged with npm-scripts node.js
418 questions
4
votes
3
answers
13k
views
Node Js Error Module.js 549
While starting my application, I get this error. I have already checked and seen that the required module is well installed, and also gave it global access.
Hussains-MacBook-Pro:NodeRest-Shop Hussain$...
79
votes
4
answers
100k
views
How to set env var for .npmrc use
I need a module in my project to download a private npm package. To accomplish this, I am using a .npmrc file to supply a read-only token needed to download the package. To keep the token supplied by ...
3
votes
4
answers
19k
views
Can't npm install on Apple Silicon M1
I'm trying to run a recently cloned Gatsby project on an M1 Mac and it's failing. Getting the following error:
npm ERR! ERR! sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-...
0
votes
1
answer
51
views
How to Resolve "The command 'node' is either misspelled or could not be found" Error on Windows?
If I want to start my React project with npm start I get this error:
The command "node" is either misspelled or
could not be found.
To my project:
node v: v22.11.0
npm v: 10.9.0
react: ^...
57
votes
13
answers
85k
views
Pass command line -- argument to child script in Yarn
I have a package.json that looks similar to this:
"scripts": {
"dev": "cross-env BABEL_ENV=client webpack --config webpack/client.development.js && yarn dev:stub-server | cross-env ...
-2
votes
1
answer
292
views
Using Environment variable in package.json through dotenv-cli
In my react project want to start production environment through .env config port.
This is my .env file:
PORT = 3001
APP_BE_IP = 127.0.0.1
APP_BE_PORT = 3333
...
1
vote
0
answers
2k
views
Javascript bot to check visa appointment not working and I don't know how to fix it
I'm trying to make a bot that takes my credentials and checks the availability of visa interview appointments for my city's US consulate, but it's my first Javascript app and I'm running around like a ...
0
votes
1
answer
264
views
npm not working while node js is working fine , dont know what is the problem
I have tried everything to run npm, installed and uninstalled node js various times still npm is not running while node js version is showing by using node -v , that is v20.18.0, but npm -v , gives ...
0
votes
1
answer
242
views
How to Properly Pass Command-Line Options for Node Test Scripts in GitHub Actions?
I'm working on a GitHub Actions workflow that executes tests using an npm script defined in my package.json. However, I've noticed that some options seem to be ignored when passed in this context. For ...
69
votes
4
answers
78k
views
Why is npm running prepare script after npm install, and how can I stop it?
Whenever I run npm install <package> it installs the package alright, but then it automatically runs the prepare script.
It's worth mentioning that I've already checked that there is no ...
1
vote
3
answers
47
views
How do I run 2 different functions from 1 file with 2 different command line prompts in Node.js?
I have a .js file in my project that imports an NPM package and has 2 functions that use that package:
//replacePaths.js
import {replaceInFile} from 'replace-in-file';
async function replace() {
...
0
votes
1
answer
70
views
Setup Configuration: Node.js / "npm start" doesn't work
npm command running in project path
Hello Developers,
I am trying to run the node.js commands - npm start and setting up a project with firebase the help of this article.
I have installed node.js ...
1
vote
0
answers
676
views
Node JS npm not working properly
After uninstall and reinstalling node js from official site. npm not working as previous. version is showing there but not able to install any module and something error is showing there, see in ...
0
votes
0
answers
135
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 ...
0
votes
1
answer
207
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 ...