Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failing on lazy loading #2635

Closed
eugenweissbart opened this Issue Mar 4, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@eugenweissbart
Copy link

eugenweissbart commented Mar 4, 2019

Version

3.0.2

Reproduction link

https://github.com/vuejs/vue-router

Steps to reproduce

  • Clone a vue-loader git repo and checkout to 3.0.2
  • Run npm install
  • Run npm test

What is expected?

All tests run smoothly

What is actually happening?

Module parse failed: Unexpected token (32:9)
You may need an appropriate loader to handle this file type.
|   // a Promise.
| };var Foo = function Foo() {
>   return import('./Foo.vue');
| };
|
 @ multi es6-promise/auto ./lazy-loading/app.js lazy-loading[1]```

The corresponding test fails afterwards

<!-- generated by vue-issues. DO NOT REMOVE -->
@posva

This comment has been minimized.

Copy link
Member

posva commented Mar 4, 2019

I think you missed the repo

@posva posva closed this Mar 4, 2019

@eugenweissbart

This comment has been minimized.

Copy link
Author

eugenweissbart commented Mar 4, 2019

No

@eugenweissbart

This comment has been minimized.

Copy link
Author

eugenweissbart commented Mar 4, 2019

@posva reopen pls

@posva

This comment has been minimized.

Copy link
Member

posva commented Mar 4, 2019

You pointed to vue-loader, I see you 😉
I remember the error. Use yarn for development, it will fix it and that's what we use anyway
Otherwise, you have to do this:

rm -rf node_modules package-lock.json
# you may or may not need to do a full npm cache clean - I did in my case
npm cache clean --force
npm install webpack@4.28.4 --save-dev --save-exact
npm install acorn-dynamic-import@4.0.0 --save-dev
npm install acorn@6.0.5 --save-dev
npm i
npm update acorn --depth 20
npm dedupe

The problem comes from webpack, not from the repo

@eugenweissbart

This comment has been minimized.

Copy link
Author

eugenweissbart commented Mar 4, 2019

Yeah, the wrong repo link was my mistake.

Thanks will try yarn instead!
Maybe this should be mentioned in README.md for the newcomers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.