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

Doesn't work with ESM #789

Closed
Trojaner opened this issue Feb 24, 2021 · 2 comments
Closed

Doesn't work with ESM #789

Trojaner opened this issue Feb 24, 2021 · 2 comments

Comments

@Trojaner
Copy link

Version

4.0.4

Reproduction link

https://plnkr.co/edit/0TYlxtktHJ1MszrL

Steps to reproduce

  1. Open repro link
  2. Observe error in console

What is expected?

App should show and not generate an error

What is actually happening?

vue.esm-browser.prod.js?module:1 TypeError: Cannot read property 'parent' of null
    at warnDeprecatedUsage (vue-router.esm.js?module:2152)
    at setup (vue-router.esm.js?module:2071)
    at kt (vue.esm-browser.prod.js?module:1)
    at vue.esm-browser.prod.js?module:1
    at vue.esm-browser.prod.js?module:1
    at B (vue.esm-browser.prod.js?module:1)
    at O (vue.esm-browser.prod.js?module:1)
    at b (vue.esm-browser.prod.js?module:1)
    at E (vue.esm-browser.prod.js?module:1)
    at T (vue.esm-browser.prod.js?module:1)

Related code (instance is null here):


@posva
Copy link
Member

posva commented Feb 24, 2021

It's https://unpkg.com/vue-router@4.0.4/dist/vue-router.esm-browser.js. The esm one is a leftover that hasn't been removed. Directly importing from https://unpkg.com/vue-router@4.0.4/dist/vue-router.esm-browser.js?module seems to correct the imports. Proposals are welcome at #694


Regarding the other libraries you are using, remember to use the forum or the Discord chat to ask questions!

@posva posva closed this as completed Feb 24, 2021
@Trojaner
Copy link
Author

Thank you

sheymans added a commit to sheymans/planntt that referenced this issue Sep 7, 2021
BLOCKED on

```
Uncaught TypeError: Cannot read property 'parent' of null
    at warnDeprecatedUsage
(/Users/sheymans/Workspaces/planntt/node_modules/vue-router/dist/vue-router.cjs.js:2331)
    at setup
(/Users/sheymans/Workspaces/planntt/node_modules/vue-router/dist/vue-router.cjs.js:2237)
    at callWithErrorHandling (runtime-core.esm-bundler.js?5c40:6992)
    at setupStatefulComponent (runtime-core.esm-bundler.js?5c40:6608)
    at setupComponent (runtime-core.esm-bundler.js?5c40:6564)
    at mountComponent (runtime-core.esm-bundler.js?5c40:4423)
    at processComponent (runtime-core.esm-bundler.js?5c40:4398)
    at patch (runtime-core.esm-bundler.js?5c40:3993)
    at mountChildren (runtime-core.esm-bundler.js?5c40:4189)
    at mountElement (runtime-core.esm-bundler.js?5c40:4098)
```

see vuejs/router#789

`vue-router` v4 has some issue that is not fixed yet. well, that's a
bummer.
sheymans added a commit to sheymans/planntt that referenced this issue Sep 9, 2021
BLOCKED on

```
Uncaught TypeError: Cannot read property 'parent' of null
    at warnDeprecatedUsage
(/Users/sheymans/Workspaces/planntt/node_modules/vue-router/dist/vue-router.cjs.js:2331)
    at setup
(/Users/sheymans/Workspaces/planntt/node_modules/vue-router/dist/vue-router.cjs.js:2237)
    at callWithErrorHandling (runtime-core.esm-bundler.js?5c40:6992)
    at setupStatefulComponent (runtime-core.esm-bundler.js?5c40:6608)
    at setupComponent (runtime-core.esm-bundler.js?5c40:6564)
    at mountComponent (runtime-core.esm-bundler.js?5c40:4423)
    at processComponent (runtime-core.esm-bundler.js?5c40:4398)
    at patch (runtime-core.esm-bundler.js?5c40:3993)
    at mountChildren (runtime-core.esm-bundler.js?5c40:4189)
    at mountElement (runtime-core.esm-bundler.js?5c40:4098)
```

see vuejs/router#789

`vue-router` v4 has some issue that is not fixed yet. well, that's a
bummer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants