简体   繁体   中英

Is there a difference between `ember serve` and `npm start`?

What is the difference between the commands ember serve and npm start ?

It depends what's defined in your package.json file. As of the current Ember CLI blueprint , npm start is defined to resolve to ember serve , so there's nearly no difference. You can change the definition of the start script to whatever you want, though, which might be useful if your application has extra startup requirements or flags.

Usually, and in a fresh Ember app, ember serve and npm run start behave identically.

There are a few rare cases, eg if the Node version of your globally installed Ember CLI version differs from the Node version of the Ember CLI version defined in your project locally, in which npm run start and ember serve might not behave the same way.

I outlined such an example case in this blog post "The difference between ember serve and npm run start" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM