1,068 questions
-3
votes
0
answers
25
views
¿Node.Js not working? Access Denied and It work unexpectedly [closed]
Before yesterday everything was working perfectly, but today when I started to work, for some reason I got VSCODE Access Denied which is strange considering that everything worked fine and without ...
0
votes
0
answers
25
views
How to use Yarn PnP Zero-Installs in CI when platform-specific packages are required?
I'm changing a project to use Zero-Installs (where .yarn/cache is committed). It works on local because the process is yarn and it builds the .yarn/cache and runs the post-install scripts necessary to ...
1
vote
1
answer
80
views
vite dependency resolving issue: missing ... specifier
I have an old Laravel project where https://materializecss.com is used. Problem is it's old and buggy and it's abandonded in 2018. I decided to switch to popular fork - https://materializeweb.com.
But ...
0
votes
0
answers
26
views
Why does running an npm script uses more memory than the process itself?
I have decided to optimize my deployment strategy recently, and started doing some tests about various stuff. One of them was deciding how to run processes.
To test it, I've created a simple node.js ...
0
votes
1
answer
43
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: ^...
-2
votes
1
answer
185
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
...
0
votes
1
answer
38
views
How do I add the original commit hash to the commit message when using the NPM package gh-pages?
I have a Svelte/TS project with an NPM script called "deploy" that uses gh-pages to commit the contents of my build/dist folder to a branch called gh-pages for automatic deploy on Github ...
2
votes
2
answers
249
views
Angular `npm start` command failing with missing "target" from proxy.conf.json
I'm trying to use Angular's hot reloading by proxying my API layer to the the API URL. So I'm using a proxy.conf.json file at the root of my project, with the following contents.
{
"/accounts/...
0
votes
1
answer
92
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
185
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 ...
2
votes
0
answers
38
views
Module parse failed: Unexpected token in react-idle-timer with React Scripts
I’m encountering an error when trying to compile my React project that uses the react-idle-timer package. The error points to an unexpected token in index.esm.js of react-idle-timer, specifically on ...
-1
votes
1
answer
302
views
npm ERR! Missing script: "watch"
I'm trying to create a Symfony + React project, following the steps in the Symfony documentation.
However, am unable to continue past npm install, as default npm commands such as npm run watch, npm ...
0
votes
1
answer
86
views
npm-run-script with commander.js
Good day. The question is simple, how to pass flags/options to npm-run-script and read them using commander.js.
Example:
package.json
{
"scripts": {
"start": "node index....
1
vote
3
answers
46
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
0
answers
90
views
How to run multiple test suites simultaneously with different numbers of workers?
Scripts from package.json:
"scripts": {
"all": "npm-run-all debug1 debug2 merge-reports",
"debug1": "npx playwright test --grep @debug1 --...
0
votes
1
answer
68
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 ...
0
votes
0
answers
18
views
How to pass a named parameter to npm-run-all command?
I have some scripts in package.json as
"scripts": {
"report:deleteOldReport": "node deleteReports.js",
"runCypress": "npx cypress run",
&...
0
votes
0
answers
103
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.
...
0
votes
0
answers
61
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,...
0
votes
0
answers
126
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
182
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 ...
3
votes
3
answers
1k
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
> ...
-1
votes
1
answer
363
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" ...
0
votes
0
answers
210
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\...
1
vote
0
answers
142
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 ...
0
votes
0
answers
205
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 ...
0
votes
0
answers
32
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": {
"...
0
votes
0
answers
46
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": { "...
-2
votes
4
answers
740
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 ...
0
votes
0
answers
20
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 : ...
1
vote
1
answer
129
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 ...
0
votes
0
answers
39
views
Npm script can't run with terminal commands
[email protected] move-public
mv ./dist/* ../server/public
'mv' is not recognized as an internal or external command,
operable program or batch file.
I tried this "move-public": "move .\...
0
votes
1
answer
358
views
How to run a nx script and nodemon script in one-line shell command?
My project is Angular. I have added a script line for running nx and nodemon commands inside of the package.json. The first command runs but the second one does not. If I stop the process and then the ...
0
votes
1
answer
78
views
Get certificate from async function?
I am trying to convert my build of a JavaSript Outlook Add-In from webpack to parceljs.
Mostly works, but fails on the configuration of the certificate for https.
The webpack configuration used an npm ...
0
votes
0
answers
448
views
how to pass args to package.json
I want users to be able to invoke npm run newpost <name> from the command line, which should result in the command hugo new blog/<name>.md being executed. So, e.g., my package.json file ...
0
votes
0
answers
25
views
I am trying to use npm start on Mac terminal and I am getting this error call command not found
Hello I am getting this error, I have tired almost everything from online source but nothing is working out, any help will be appreciated, thanks
enter image description here
Hello I am getting this ...
1
vote
1
answer
59
views
I have downloaded node as well as npm , and it is well installed in the system , but npm is still not working
'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
operable program ...
0
votes
0
answers
608
views
I have in my microservice problem with nx
I am facing next error in deploying storybook its monorepo which needs to publish some packages into nexus also deploy storybook but in deploying one of the service here is design it shows this error ...
2
votes
1
answer
112
views
How to block npm install in nested workspace folders?
I'm using npm workspaces.
So the app's structure is
.
+-- package.json
-- packages
+-- a
| -- package.json
-- b
-- package.json
The npm install script should be executed from ...
-1
votes
1
answer
342
views
Cannot run react template i downloaded
i have downloaded a react template and wanted to customize it. i have put the node modules folder and when i run the npm run start command i get the following errors
npm ERR! code ENOENT
npm ERR! ...
0
votes
0
answers
124
views
npm: command not found, and failed to install it
The hosting limited terminal commands, npm, sudo, spt and more not working, while laravel project needs "npm install && npm run dev", Is there a solution, even if it manaul ...
-1
votes
2
answers
292
views
npm start failed at start: `react-scripts start`
I was trying to push to git but my files were too large. Tried removing the node_modules folder and then running npm start but now I am getting this error:
Invalid options object. Dev Server has been ...
1
vote
0
answers
402
views
Build time Type error Type 'OmitWithTag<typeof
export default async function Product({
params,
}: {
params: { slug: string | undefined };
}) {
// uri to get single Product from backend
const filteredData = pagedata.filter((elem) => elem....
0
votes
0
answers
132
views
I am having issues making bubbly button "bubble" javascript
the button appears and it is styled using CSS, that is ok however onClick it does not call the script, that is my best guess, have been trying to make it happen with no luck
I do not know if my script ...
0
votes
1
answer
231
views
Docker command `npm run` behaves different in GitLab and in local machine
I built the follow Docker container
FROM node:20-alpine as ember
WORKDIR /usr/app
COPY package*.json /usr/app/
RUN apk fix && \
apk --no-cache --update add git && \
npm clean-...
0
votes
0
answers
71
views
npm works only one time on one time connection to internet, requires frequent re-connection
Detailed Scenario
Connect to internet(wifi) on PC(pop-os)
Run an npm command - works fine
Run another npm command - stuck on (⠂⠂⠂) ⠧ idealTree:gdtot_data: sill idealTree buildDeps
Disconnect and ...
0
votes
1
answer
473
views
monocart-reporter @owner tag will NOT attach to the test i'm running
I'm using playwright to run my e2e tests, and i've installed monocart-reporter https://www.npmjs.com/package/monocart-reporter#examples to try to add the "owner" tag for each test, so that ...
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
242
views
Run npm install for two different package.json in parallel
I want to run npm install for two different package.json in parallel or one after the other.
I have two package.json in two different folders under the same project. One is for the front end and one ...
0
votes
0
answers
154
views
How should I pass a parameter with space to npm script from Powershell
I am trying to pass a file name that has a space to npm script. For example, if the file name is "A B.text", when I try to run the following command npm start "A B.txt" in ...