# WebpackBundler Error

**URL:** <https://discuss.emberjs.com/t/webpackbundler-error/21629>\
**Category:** Build Issues\
**Created:** [May 16, 2025, 7:55pm UTC](https://discuss.emberjs.com/t/webpackbundler-error/21629 "2025-05-16T19:55:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Szabo\_Bogdan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/szabo_bogdan/32/16959_2.png) [@Szabo\_Bogdan](https://discuss.emberjs.com/u/Szabo_Bogdan)\
**Post date:** [May 16, 2025, 7:55pm UTC](https://discuss.emberjs.com/t/webpackbundler-error/21629/1 "2025-05-16T19:55:46Z")

</div>

Hey,

I try to include an addon v2 in an Ember app, but just by including it, I get build errors for every import from that addon, like this one:

```auto

WARNING in models/article-link.js 4:361-365
export 'attr' (imported as 'attr') was not found in 'ember-data/model' (possible exports: default)
 @ ../../../../../../../../tmp/broccoli-44252FbQ8ZgQ06Ijl/cache-341-webpack_bundler_ember_auto_import_webpack/app.cjs 297:116-153

....

ERROR in ../models/dist/transforms/visibility.js 1:298-339
Module not found: Error: Can't resolve '@ember/application' in 'models/dist/transforms'
 @ ../../../../../../../../tmp/broccoli-35068LcBLK7ohcYmS/cache-341-webpack_bundler_ember_auto_import_webpack/app.cjs 386:120-159

```

Any thoughts on how I can debug this?

Best, Bogdan

---

<div class="post-metadata">

**Author:** ![runspired](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/runspired/32/18654_2.png) [@runspired](https://discuss.emberjs.com/u/runspired)\
**Post date:** [May 17, 2025, 8:26am UTC](https://discuss.emberjs.com/t/webpackbundler-error/21629/2 "2025-05-17T08:26:20Z")

</div>

from the error it appears you are using an extremely old version of ember-data. Importing v1 addons from v2 addons is dicey, doing so with a very old version is especially unlikely to work.

Or, if you are using a newer version, the issue may just be a mistyped import. Typically `attr` is imported like `import { attr } from '@ember-data/model`, while the much older version of this was `import attr from 'ember-data/attr';`. I’m not aware of `import { attr } from 'ember-data/model';` ever having worked tbh.

---

<div class="post-metadata">

**Author:** ![Szabo\_Bogdan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/szabo_bogdan/32/16959_2.png) [@Szabo\_Bogdan](https://discuss.emberjs.com/u/Szabo_Bogdan)\
**Post date:** [May 17, 2025, 3:32pm UTC](https://discuss.emberjs.com/t/webpackbundler-error/21629/3 "2025-05-17T15:32:14Z")

</div>

indeed I tried to update from ember-data 5 to 6, but those imports don’t look like the source of the errors. This an example file with the error:

```auto
import Model, { attr } from 'ember-data/model';

export default class ArticleLinkModel extends Model {
  @attr('string') url;
  @attr('string') articleId;
}

```

and another one with errors with ember imports:

```auto
/**
  Copyright: © 2015-2025 GISCollective
  License: Subject to the terms of the AFFERO GENERAL PUBLIC LICENSE, as written in the included COPYING file.
*/
import Transform from 'ember-data/serializer/transform';
import { getOwner } from '@ember/application';
import { tracked } from '@glimmer/tracking';
import { later } from '@ember/runloop';

export class Visibility {
  @tracked isPublic;
  @tracked isDefault;
  @tracked _team;
  @tracked teamId = '';

  /// ....
} 

```

But I will try to double-check those imports and see if this is the issue. Also, I want to mention that the addon builds without errors; only apps using this addon fail, including the associated test app.

---

<div class="post-metadata">

**Author:** ![Szabo\_Bogdan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/szabo_bogdan/32/16959_2.png) [@Szabo\_Bogdan](https://discuss.emberjs.com/u/Szabo_Bogdan)\
**Post date:** [May 18, 2025, 1:23pm UTC](https://discuss.emberjs.com/t/webpackbundler-error/21629/4 "2025-05-18T13:23:32Z")

</div>

Yes, indeed it was an import issue. It is very confusing, though, because building the addon does not raise any error. I assume this is an issue with rollup.
