This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts. run[-script] is used by the test, start, restart, and stop commands, but can be called directly, as well. When the scripts in the package are printed out, they're separated into lifecycle (test, start, restart) and directly-run scripts.
Questions tagged [npm-run]
183 questions
3
votes
0 answers
webpack.optimize.UglifyJsPlugin has been removed
I am working on a udemy course project and upgraded on my packages and modules to their latest version, including webpack4. However, on running npm run-build, I am getting the following error in my terminal.
I have managed to get my dev environment…

Jacques
- 205
- 2
- 13
3
votes
4 answers
package.json: how to test if node_modules exists
Inside package.json, is it possible to test if node_modules directory exists?
My goal is to print a message if node_module does not exists, something like:
node_module not existent: use npm run dist
where dist is a script inside scripts of my…

caneta
- 1,612
- 2
- 20
- 34
3
votes
2 answers
Why does this fish while loop terminate after a single iteration?
This is a fish function used to upgrade JavaScript packages for a project. Strangely, it terminates after a single iteration with an exit status of 0. Why?
function yarn-upgrade-all --description "Upgrade JavaScript packages"
yarn outdated | sed…

Claudio
- 3,089
- 2
- 18
- 22
3
votes
2 answers
"Module build failed..." in Laravel Mix
I did not change anything in app.scss, but when I run npm run watch I get the following errors:
error in ./resources/sass/app.scss
Module build failed (from…

Taqi Vaheed
- 116
- 1
- 1
- 11
3
votes
1 answer
Using a package.json variable in npm script
I'm using npm run to build a javascript file through browserify. Before building, I would like it to create a directory in my build folder, named after the version listed in the package.json. Here is a trimmed example of my package.json:
{
"name":…

LongInt
- 1,739
- 2
- 16
- 29
3
votes
0 answers
npm run npm bin from within the same package
I'm working on extending open source raml2html library, which consumes raml contract to generate html docs. Key facts:
the library has a binary placed in bin/raml2html file; th ebinary is stated in package.json as follows:
"bin": {
"raml2html":…

ducin
- 25,621
- 41
- 157
- 256
2
votes
3 answers
How to fix : cannot find Module error in while running the npm run build command
In my application, npm run build command throws a module not found error as below:
npm WARN npm npm does not support Node.js v16.17.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that…

vijay s
- 147
- 1
- 4
- 15
2
votes
1 answer
TypeScript error in /home/Documents/node_modules/cheerio-select/lib/index.d.ts(1,15): [0] ',' expected. TS1005
Hello I am getting this error in terminal when i run npm run dev & npm run build in my terminal.
[0] Failed to compile. [0] [0]
/home/Documents/frontend/node_modules/cheerio-select/lib/index.d.ts
[0] TypeScript error…

GCT
- 43
- 7
2
votes
2 answers
How to Revert NPM Run Build With Laravel9
As the title says. Usually npm run dev is used for the local environment but I have run npm run build mistakenly in cmd and npm run build minify all files. Now I can't debug my front end.I also deleted the node_modules and package-lock.json file and…

Adnan Ali
- 61
- 6
2
votes
2 answers
How do I fix 'The filename, directory name, or volume label syntax is incorrect' when trying to start environment
I have currently forked and cloned this repo and followed the instructions on the README.md. I have no problem installing my dependencies, but once I go to the next step of starting the WordPress instance with the npm run env:start command, I get…

Leslie O
- 193
- 1
- 1
- 8
2
votes
3 answers
BUILD FAILED: can't install the app when i run npm run android
I am trying to build a mobile app using reactnative and testing on android emulator but when i run the app using npm run android it fails .
I tried modifyiing the gradle.build file (upgrading sdk version to 31 ..) but nothing works.
npm install…

Emna Gharsalli
- 31
- 2
- 4
2
votes
0 answers
npm - error in main, module not found - new laravel (8) app
Complete Laravel newbie here but I've googled for the past hour with no luck.
I've installed Laravel via composer (everything was working with the default set up) but I wanted to use bootstrap so I've installed npm, followed this guide here but when…

C Mills
- 21
- 5
2
votes
0 answers
How can i remove the errors while running the 'npm run build' command?
this is the error I am getting
F:\Web Development\hong kong\Course1 bootstrap\week4Assignment4>npm run build
confusion@1.0.0 build F:\Web Development\hong kong\Course1 bootstrap\week4Assignment4
npm run clean && npm run imagemin && npm run…

Jitesh
- 33
- 1
- 6
2
votes
0 answers
cross-env: Permission denied when deploy docker on container-optimized-os
First I deployed my laravel project on google container-optimized-os.
And I have created the build by running:
docker-compose up -d
After it has finished to go into app container and I run:
docker exec -it app bash
I then run:
npm install
and
npm…

Prototyp3
- 75
- 2
- 11
2
votes
0 answers
VueJS-"npm run build" doesn not create index.html
I faced a problem in vue js when using "npm run build" command when try to deploy the app in to github. It does not create the index.html file in the dist folder. It only contains two files named as "build.js" & "build.js.map". As well as I couldn't…

Naynajith
- 75
- 4