ember-can icon indicating copy to clipboard operation
ember-can copied to clipboard

Error when running tests: this version of ember-auto-import requires the app to have a dependency on webpack

Open Gorzas opened this issue 4 years ago • 10 comments

Could anyone try if you have the same problem? I believe it's related to the last release of EmberJS (3.27) when doing npm run test:

[ember-auto-import] this version of ember-auto-import requires the app to have a dependency on webpack 

I found it when trying to solve this PR. It seems to have a very easy solution but I need to know I'm not the only one having this issue.

Gorzas avatar Jul 05 '21 15:07 Gorzas

webpack is required for ember-auto-import v2 so I'm assuming somehow auto import was upgraded. I don't see ember-auto-import v2 as a requirement for ember 3.27, so is there a chance you upgraded it on your own?

patrickberkeley avatar Jul 05 '21 18:07 patrickberkeley

@patrickberkeley I'm going to rm node_modules and try again. I also have seen that package-lock.json gets updated after doing an npm install, don't know if it's related.

Gorzas avatar Jul 06 '21 13:07 Gorzas

The ember-auto-import dependency is directly in the package.json: https://github.com/minutebase/ember-can/blob/master/package.json#L68

Gorzas avatar Jul 06 '21 14:07 Gorzas

Ah that would do it :-P Pretty sure a webpack config is required then.

patrickberkeley avatar Jul 06 '21 15:07 patrickberkeley

Hmm, all tests are passing for me locally without any issues. Same for CI. What version of node and npm are you using? Im testing on the latest.

Exelord avatar Jul 07 '21 07:07 Exelord

@Exelord Could try to do rm -rf node_modules and install the dependencies again, please?

Gorzas avatar Jul 07 '21 08:07 Gorzas

Yes, that's what I did. All works just fine. CI confirms that. :)

Exelord avatar Jul 07 '21 09:07 Exelord

I'm using node 12.22.1 and npm 6.14.12

Gorzas avatar Jul 07 '21 15:07 Gorzas

Try with latest node 14 or 16 and npm 7.19^

Exelord avatar Jul 07 '21 15:07 Exelord

@Exelord It works with Node 14/16 and npm 7.19. I have updated the PR upgrading the requirement of Node version: https://github.com/minutebase/ember-can/pull/146

Gorzas avatar Jul 15 '21 14:07 Gorzas