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
1
vote
1 answer
npm script with just ts-node fails
I have a seemingly simple npm script that is failing but I cannot seem to figure out why.
I have the following packages installed globally:
+-- ts-node@8.3.0
+-- tsconfig-paths@3.8.0
+-- typeorm-model-generator@0.3.4
`-- typescript@3.5.2
When I…

eBehbahani
- 1,579
- 5
- 19
- 41
1
vote
0 answers
After npm run build only few images in dist folder
When I run my vue.js project in dev mode, all images are loaded properly but after npm run build, some images are missing because they are not in the generated dist folder.
Some images got transfered but not all. I don't get the reason why the…

lseltt
- 25
- 5
1
vote
1 answer
sh: webpack command not found
i'm new to Webpack and i was follow their documentation
https://webpack.js.org/guides/getting-started/
in order to structure my first simple code and build the same using webpack
in the last section where i have to add build command to scripts in…

Noubar Hanno
- 21
- 1
- 3
1
vote
1 answer
What causes this webpack out-of-memory exception?
When building my typescript project, i.e. I run npm run build, and the script looks like "build": "webpack", I get the error below.
It complains about being out of memory, even though vscode only consumes about 2GB of RAM, and I still have plenty…

JBSnorro
- 6,048
- 3
- 41
- 62
1
vote
2 answers
How to change value appcss in laravel
I want to change background color in laravel page. Based on reference that i get. i should make a change in _variables.scss.
// Body
$body-bg: #f8fafc; --> i change it to #000
// Typography
$font-family-sans-serif: "Nunito",…

Hana Hae
- 13
- 3
1
vote
4 answers
Is it possible to create custom npm run commands for Laravel?
Laravel has the following built-in npm run commands (among others):
npm run install
npm run watch
Is it possible to create custom npm run commands to run custom PHP scripts? For example, I want to create a command called npm run csv that will run a…

HartleySan
- 7,404
- 14
- 66
- 119
1
vote
1 answer
Yarn run command fail but npm run works
When I try to run yarn run command in a project I'm getting below error in git-bash.
/d: /d: Is a directory
?[2K?[1G?[31merror?[39m Command failed with exit code 126.
However if I run it using npm run it works fine.
Repo to reproduce the error -…

Shabith
- 3,005
- 3
- 23
- 20
1
vote
1 answer
run postgraphile with npm
I'm working on a react app and using apollo and postgraphile for graphql. I currently have to have two terminal windows open, one running
npm start
for the react-dev server, and one running
postgraphile -c 'postgresstring'
for the postgraphile…

Sdarb
- 173
- 1
- 10
1
vote
0 answers
Cannot read eslintrc config file, stripComments is not found
Im struggling with an npm run build (webpack) step. Locally on my machine its building fine. But on the remote build im getting an error when it tries to build the eslint module.
The error is as follows:
ERROR in ./app/app.module.js
Module build…

gmoney
- 335
- 1
- 5
- 16
1
vote
1 answer
"Npm Run SJS" Is Not Working
I've forked a project from GitHub, and I want to run the command npm run sjs, but it gives me an error. This is what it says:
> vodafone@0.1.0 sjs C:\Users\audre\fantastic-website\vodafone\vodafone
> json-server ./data/phones.json -p 1234…
user9832881
1
vote
1 answer
'npm run build' (ejected project has SCSS loader) error
My React project (made with create-react-app) was ejected before I started the project. I included an SCSS loader in the webpack file.
Now, when I try to run 'npm run build', the following error gets shown:
Invalid CSS after "i": expected 1 selector…

NovoBook
- 103
- 1
- 7
1
vote
1 answer
npm run dev causes errors on fresh laravel 5.6.x installation
I'm busy learning Laravel and run into a problem when i want to run npm run dev
First some background information:
Laravel version 5.6.22
npm version 6.01
node version 8.10.0
OS Ubuntu 18.4 LTS
PHP 7.2.5
Composer v 1.6.3
Executed steps:
Created a…

CodeNinja
- 836
- 1
- 15
- 38
1
vote
0 answers
Angular 2 getting error **CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory** while using npm run start
Angular2 i am getting this error CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory while running using npm run start
i have tried upgrading the npm version, also i have tired increasing --max_old_space_size=4096
<--- Last few…

Prabakaran V
- 233
- 4
- 16
1
vote
1 answer
Laravel: compile node_modules to app.js and app.css
I've created a new Laravel-project using composer
./composer.phar create-project laravel/laravel --prefer-dist ProjectName
Next, I've added the required packages through npm. I've already noticed the --save switch is necessary to make it work…

user3582780
- 43
- 9
1
vote
0 answers
npm run typing error Windows_NT 6.3.9600
i am trying to run the typings using below command
npm run typings -- install dt ~ core-js --save –global
i am facing the below errors.and struggling to understand to rectify this.please help with the solution.thanks in advance.
17 error…

vineethc4f
- 259
- 1
- 3
- 6