简体   繁体   中英

Error broccoli-esnext is deprecated

Running examples from https://github.com/suchitpuri/emberjs-essentials/ . I'm receiving errors.

:~/ember-projects/emberjs-essentials/chapter-5/example1$ ember server


version: 0.1.4
invalid watchman found, version: [4.3.0] did not satisfy [^3.0.0], falling back to NodeWatcher
[deprecated] broccoli-esnext is deprecated. Use broccoli-babel-transpiler instead. https://github.com/babel/broccoli-babel-transpiler
[deprecated] broccoli-esnext is deprecated. Use broccoli-babel-transpiler instead. https://github.com/babel/broccoli-babel-transpiler
[deprecated] broccoli-esnext is deprecated. Use broccoli-babel-transpiler instead. https://github.com/babel/broccoli-babel-transpiler
[deprecated] broccoli-esnext is deprecated. Use broccoli-babel-transpiler instead. https://github.com/babel/broccoli-babel-transpiler

The ember server won't work properly. It starts but I never receive response from localhost:4200 keeping waiting for it. I checked code for existing references to broccoli-esnext. But it seemed to be called as the dependence not included directly in package.json. Can someone please explain how to fix this. Spent lots of time googling the issue but with no luck so far.

I had the same problem, in my case it was because I had installed a version of ember-cli ages ago and it was still sitting there somehow overriding my fresh install of ember-cli.

I checked out the brocfile that looked like this(massive comments removed):

var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();
module.exports = app.toTree();

I checked out the required file, that only contained reference to the reccomended broccoli-babel-transpiler :

var Babel  = require('broccoli-babel-transpiler');

I started getting the hunch I was not using the newly installed ember-cli and checked the version of ember-cli:

ember -v
> 0.1.4

I had no idea what the current version of ember-cli was, but I suspected 0.1.4 was not it. I checked their site and found the version history:

https://github.com/ember-cli/ember-cli/releases

There was some steps to remove old ember-cli and update to current version:

  1. npm uninstall -g ember-cli -- Remove old global ember-cli
  2. npm cache clean -- Clear NPM cache
  3. bower cache clean -- Clear Bower cache
  4. npm install -g ember-cli@2.6.0-beta.2 -- Install new global ember-cli

I uninstalled ember-cli, and still:

ember -v
> 0.1.4

Cleaning the npm cache seemed to hang on my computer. But I removed the old ember-cli folders manually. I'm on windows and I had the ember executable in:

c:\users\currentuser\Appdata\Roaming\npm

I also removed the ember-cli subfolder in:

c:\users\currentuser\Appdata\Roaming\npm\node_modules

And again in:

c:\users\currentuser\Appdata\Roaming\npm-cache

After reinstalling ember-cli with

npm install -g ember-cli@2.6.0-beta.2

Everything worked perfectly!

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