Webpack throwing error when importing glimmer/tracking

Hi all, I’m trying to use a tracked property in my glimmer component (I’ve never used this before) and whenever I build my solution, webpack returns an error. I’ve tried delete node_modules and reinstalling, the package is there so I don’t understand why it doesn’t work. Here’s the full error log:

ERROR Summary:
  • broccoliBuilderErrorStack: Error: webpack returned errors to ember-auto-import at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\webpack.js:202:32 at finalCallback (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:214:39) at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:263:14 at AsyncSeriesHook.eval [as callAsync] (eval at create (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\tapable\lib\HookCodeFactory.js:33:10), :4:1) at AsyncSeriesHook.lazyCompileHook (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\tapable\lib\Hook.js:154:20) at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:261:22 at Compiler.emitRecords (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:375:39) at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:255:10 at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:361:14 at AsyncSeriesHook.eval [as callAsync] (eval at create (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\tapable\lib\HookCodeFactory.js:33:10), :13:1)
  • code: [undefined]
  • codeFrame: webpack returned errors to ember-auto-import
  • errorMessage: webpack returned errors to ember-auto-import at Bundler -~- created here: -~- at new Plugin (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\broccoli-plugin\index.js:7:31) at new Bundler (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\bundler.js:32:9) at AutoImport.makeBundler (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\auto-import.js:62:16) at AutoImport.addTo (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\auto-import.js:72:38) at EmberApp.host.addonPostprocessTree (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\auto-import.js:106:29) at EmberApp.toTree (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-cli\lib\broccoli\ember-app.js:1669:17) at module.exports (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\ember-cli-build.js:26:14) at Builder.readBuildFile (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-cli\lib\models\builder.js:49:14) at Builder.setupBroccoliBuilder (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-cli\lib\models\builder.js:63:22) at new Builder (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-cli\lib\models\builder.js:29:10) -~- (end) -~-
  • errorType: Build Error
  • location:
    • column: [undefined]
    • file: [undefined]
    • line: [undefined]
    • treeDir: [undefined]
  • message: webpack returned errors to ember-auto-import at Bundler -~- created here: -~- at new Plugin (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\broccoli-plugin\index.js:7:31) at new Bundler (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\bundler.js:32:9) at AutoImport.makeBundler (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\auto-import.js:62:16) at AutoImport.addTo (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\auto-import.js:72:38) at EmberApp.host.addonPostprocessTree (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\auto-import.js:106:29) at EmberApp.toTree (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-cli\lib\broccoli\ember-app.js:1669:17) at module.exports (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\ember-cli-build.js:26:14) at Builder.readBuildFile (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-cli\lib\models\builder.js:49:14) at Builder.setupBroccoliBuilder (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-cli\lib\models\builder.js:63:22) at new Builder (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-cli\lib\models\builder.js:29:10) -~- (end) -~-
  • name: Error
  • nodeAnnotation: [undefined]
  • nodeName: Bundler
  • originalErrorMessage: webpack returned errors to ember-auto-import
  • stack: Error: webpack returned errors to ember-auto-import at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\ember-auto-import\js\webpack.js:202:32 at finalCallback (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:214:39) at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:263:14 at AsyncSeriesHook.eval [as callAsync] (eval at create (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\tapable\lib\HookCodeFactory.js:33:10), :4:1) at AsyncSeriesHook.lazyCompileHook (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\tapable\lib\Hook.js:154:20) at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:261:22 at Compiler.emitRecords (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:375:39) at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:255:10 at E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\webpack\lib\Compiler.js:361:14 at AsyncSeriesHook.eval [as callAsync] (eval at create (E:\CustomerWork\L&MDiamondDrilling\Code\LandM\node_modules\tapable\lib\HookCodeFactory.js:33:10), :13:1)

=================================================================================

I don’t have enough context here to figure out exactly what’s going on. But webpack (via ember-auto-import) shouldn’t be involved at all handling @glimmer/tracking, because imports from @glimmer/tracking get handled by babel-plugin-ember-modules-api-polyfill (which is included automatically by ember-cli-babel).

There was a bug fixed recently, so first make sure you’re on the latest ember-cli-babel.