'Errors when using "npm start" (in MacOS)
I have been trying for sometime already to just run "npm start" for an old app developed with EmberJs but I get several errors. I had tried the following:
- Uninstall, cache clean, install Ember-cli
- Remove the "node_modules" and run "npm install"
- Updating ember-cli-babel
- And some few others like updating / removing packages
I haven't open this project for around 3 years so I am pretty sure there are new updates that probably I need to follow but not sure what else to do after the list I just mentioned above.
I uploaded what I get when running "npm start". Any guidance, help, or suggestion I would appreciate it! Thanks in advance!!
user@User-MacBook-Air app2 % npm start
> [email protected] start /Users/user/Projects/app2
> ember serve
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: app -> ember-clean-tmp -> ember-cli-babel
ember-cli-htmlbars-inline-precompile v1.0.0 and above require the ember-cli-babel v6.7.1 or above. To use ember-cli-babel v5.x please downgrade ember-cli-htmlbars-inline-precompile to v0.3.
An error occurred in the constructor for ember-cli-htmlbars-inline-precompile at /Users/user/Projects/app2/node_modules/ember-cli-htmlbars-inline-precompile
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `ember serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2022-04-17T17_03_00_039Z-debug.log
Solution 1:[1]
To make your life easier and get your app going faster, I’d suggest trying to stay in the Babel 5.x world and see how few dependencies you can update to start with. So I’d probably start by heading the suggestion in the warning and downgrade
ember-cli-htmlbars-inline-precompile v1.0.0 and above require the ember-cli-babel v6.7.1 or above. To use ember-cli-babel v5.x please downgrade ember-cli-htmlbars-inline-precompile to v0.3.
That may still mean you but other errors, but ideally you’d stick with the same ember, ember cli and ember data (and all associated dependencies) instead of trying to do a large and possibly time-consuming upgrade
Also, might be worth introducing a lock file (either using Yarn 1 or a Node 6 lock file if your system can run with it) so you don’t hit this issue in the future.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | acorncom |
