Questions tagged [npm-start]

For questions relating specifically to the starting of a development server in a Node.js (npm) project.

This runs an arbitrary command specified in the package's "start" property of its "scripts" object. If no "start" property is specified on the "scripts" object, it will run node server.js.

As of npm@2.0.0, you can use custom arguments when executing scripts. Refer to npm-run-script for more details.

To find more information :

457 questions
363
votes
40 answers

How to solve npm error "npm ERR! code ELIFECYCLE"

I'm trying to learn react, so I have this sample code for the full-stack react voting app, and I am trying to get it to work but after running npm install followed by npm start I receive the following error when I run npm start can anyone help me…
user7037425
55
votes
4 answers

How can I clean (reset cache) of React Native using Expo. Not sure if it is cache issue

I am building a simple React Native app with create-react-native-app using only react-navigation and base-64(base 64 encode/decode) as dependencies. Over time starting the app became slower and now sometimes it is getting stuck(waiting for about…
Nedko Dimitrov
  • 2,199
  • 1
  • 19
  • 27
49
votes
2 answers

How to update globally installed npm packages

Command: npm outdated -g Output: Package Current Wanted Latest Location @angular/cli 1.3.1 1.7.4 7.0.5 create-react-app 1.5.2 1.5.2 2.1.1 eslint 5.6.0 5.9.0 5.9.0 expo-cli 2.2.0 2.3.8 …
Akash Sawant
  • 657
  • 1
  • 5
  • 11
46
votes
3 answers

What is the difference between yarn run and npm start?

Is yarn run intended to be the equivalent of npm start?
daniely
  • 5,467
  • 3
  • 27
  • 40
31
votes
2 answers

Failed to compile. webpack is not a function

My project was working fine but after installing react-redux and redux i can't start the project it shows me this error Failed to compile. webpack is not a function npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! project@0.1.0 start: `node…
Gulzar Yousaf
  • 331
  • 1
  • 3
  • 7
31
votes
6 answers

How to open browser to localhost through npm scripts

I've been trying to figure out how to write a npm script that will culminate with the application being launched in the user's browser without them having to manually open the browser and go to localhost:1234. Right now my script reads as: "start":…
rockchalkwushock
  • 933
  • 1
  • 8
  • 18
23
votes
5 answers

Why do I obtain this error when deploying app to Heroku?

I am getting some kind of error when deploying my app to heroku using git hub. The problem is, I don't understand the heroku logs and the entailing errors. Here is the heroku log: Marcuss-MacBook-Pro:Weather-App marcushurney$ heroku…
Mjuice
  • 1,156
  • 2
  • 11
  • 29
20
votes
10 answers

electron - node.js - ng : file path\ng.ps1 cannot be loaded because running scripts is disabled on this system

I am trying to compile a project on Windows 10 in Visual Studio Code, my settings are the following: 1) npm version 6.12 2) Node.js version 12.13 3) Angular CLI: 8.3.19 The problem I have is as soon as I try to run ng serve I receive the following…
Emanuele
  • 1,860
  • 4
  • 15
  • 42
19
votes
10 answers

Missing Script when I run npm start to create React app

I'm trying to run the React server by running npm start When I do this I get a missing script error: λ npm start npm ERR! missing script: start npm ERR! A complete log of this run can be found in: npm ERR! …
Aristophanes
  • 395
  • 1
  • 2
  • 17
16
votes
4 answers

Pm2 changing log file location

I have couple of questions regarding pm2 How can I change the location of server-error-0.log and server-out-0.log files location from c:\users\user\.pm2\logs to other drive, due to restriction in server's c drive access. Can I log the error and…
Jeet
  • 4,527
  • 7
  • 34
  • 59
14
votes
2 answers

NPM Init and Start

I'm using npm for a local project and I want to know if I have to use npm init every time I start a session? I think the answer is yes. If I restart my machine for example, do I have to do npm init? Do I have to do npm install and npm start each…
Al Lemieux
  • 167
  • 1
  • 2
  • 7
10
votes
1 answer

Why is npm react-scripts producing a syntax error when I run `npm run start`?

So I've been working on a full stack React app for a few months now. For some reason, seemingly out of no where, when I tried to run npm run start on the command line, it produced the following error; // npm run start > pair@0.1.0 start…
user10750437
  • 246
  • 3
  • 10
8
votes
11 answers

npm start errors with ERR! code ENOENT, syscall open

I'm suddently having a problem with "npm start" in my React application. When I trigger it, this is what I receive: npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /mnt/c/Users/pal/Desktop/dev/myApp/package.json npm ERR! errno -2 npm ERR!…
palnic
  • 132
  • 1
  • 1
  • 9
8
votes
2 answers

Metro Bundler ready. ERROR ENOSPC: System limit for number of file watchers reached, watch

Metro Bundler ready. ERROR ENOSPC: System limit for number of file watchers reached, watch
Mahendra Pratap
  • 1,889
  • 3
  • 16
  • 41
7
votes
13 answers

Why I am getting this error message when I run react js project first time in my system?

When I run npm start, I get this error message: Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys' Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys' Error from chokidar…
Vikram Shekhawat
  • 401
  • 1
  • 6
  • 9
1
2 3
30 31