Questions tagged [npm-run]

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.

Reference:

183 questions
36
votes
5 answers

Vue router and Cordova (Vue.js)

EDIT So I just found out it has to do with the router being in history mode, if I remove 'mode': 'history', from router.js everything works again! Leaving here if others have the same problem, or if someone can provide an explanation... Original I'm…
Adam
  • 3,142
  • 4
  • 29
  • 48
30
votes
3 answers

How to check if npm script exists?

I am creating a bash script which runs through each of my projects and runs npm run test if the test script exists. I know that if I get into a project and run npm run it will give me the list of available scripts as follows: Lifecycle scripts…
theJuls
  • 6,788
  • 14
  • 73
  • 160
29
votes
4 answers

npm run dev --host network: not exposed

I want to expose my svelte app on LAN using the npm run dev --host command but it shows: > frontend@0.0.1 dev > svelte-kit dev SvelteKit v1.0.0-next.295 local: http://localhost:3000 network: not exposed Use --host to expose server to…
blest
  • 437
  • 1
  • 4
  • 10
28
votes
2 answers

NPM run * doesn't do anything

I was running an Electron project, and everything worked just fine. But now when I run any of the scripts in my package.json (including npm start), it just escapes a line and doesn't do anything. My package.json: { "name": "interclip-desktop", …
Filip Troníček
  • 434
  • 1
  • 5
  • 14
13
votes
3 answers

Node and NPM Running script and Ctrl-C triggers SIGINT twice

I've come across a problem on one of my Nodejs apps running with npm start (which just does node app.js). My app contains a sigint handler as follows: process.on('SIGINT', () => { db.disconnect().then({ process.exit(0); }).catch(e =>…
Jo Colina
  • 1,870
  • 7
  • 28
  • 46
11
votes
3 answers

react.js - running npm run build with custom paths

Running npm run build command on create-react-app project creates a build folder and some default paths inside all files like in map files: {"version":3,"sources":["../static/js/main.500cb0d9.js" ... Can I change all the paths inside the build…
Itsik Mauyhas
  • 3,824
  • 14
  • 69
  • 114
10
votes
2 answers

VSCode terminal process command failed to launch

I am trying out the Hello World sample extension. But when I run the extension from the 'Run Extension' task. It gives the following error: The terminal process command '/bin/zsh -c 'npm run watch'' failed to launch (exit code: 127) But I am able…
8
votes
3 answers

npm run scripts does not working

I have just initialized a new project with Node.js and trying making the scripts in package.json file to be working. For example I have the next package.json file: { "name": "my-app-name", "version": "1.0.0", "description": "Description…
Raz Buchnik
  • 7,753
  • 14
  • 53
  • 96
5
votes
1 answer

Is there a way to watch two Laravel Mix Webpack config files at the same time for any changes?

Using Laravel Mix, is it possible to watch two Webpack config files with one command so that changes to any of the underlying files instantly cause the necessary files to be compiled? Specifically, I have the following two Webpack config files I'm…
HartleySan
  • 7,404
  • 14
  • 66
  • 119
4
votes
1 answer

How to limit CPU usage of Docker build command?

My Dockerfile executes RUN npm run build command. When I execute docker build command on t2.micro EC2 instance, instance freezes and does not respond (I cannot even connect with ssh). When I monitor the CPU usage, I can see that CPU usage reached to…
Hüseyin Aydın
  • 486
  • 5
  • 9
4
votes
1 answer

Npm run watch doesn't work with laravel : sh: cross-env: command not found

I want to execute "npm run watch" in my laravel project but it doesn't work. There is the error message @ watch /Applications/MAMP/htdocs/test-tech/laravel5 npm run development -- --watch @ development…
Cohchi
  • 543
  • 3
  • 9
  • 19
4
votes
2 answers

Unable to build react app using npm run build - Exit status 1

I have created a react app using create-react-app, and when I first tried to build it using npm run build, it was working fine. However, after a couple of days of developing when I try to run the same command, I'm facing the following issue. 0 info…
user1959214
  • 117
  • 1
  • 2
  • 7
3
votes
2 answers

ReferenceError: webpack_base_uri is not defined

ERROR: Html Webpack Plugin: Error: webpack://webpack/data:text/javascript,webpack_public_path_=webpack_base_uri=_htmlWebpackPl uginPublicPath;?:2 webpack_require.p = webpack_base_uri = htmlWebpackPluginPublicPath; ^ ReferenceError:…
ymtx
  • 41
  • 2
3
votes
0 answers

npm run dev won't auto refresh with latest changes

I have an vue.js application that won't auto refresh when I run 'npm run dev' - the application will only update when I run 'npm run build'. The application will start when I run npm run dev but it just doesn't have the latest changes until I do a…
3
votes
1 answer

How to remove Typescript assert when using npm run build?

What is the best way to remove Typescript asserts so that a production build created using npm run build is assert free? Thank you
Olivierwa
  • 143
  • 1
  • 9
1
2 3
12 13