Skip to content

Syntax breakage in Proxy.js #1641

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

Closed
thomasbalsloev opened this issue Dec 20, 2021 · 7 comments
Closed

Syntax breakage in Proxy.js #1641

thomasbalsloev opened this issue Dec 20, 2021 · 7 comments

Comments

@thomasbalsloev
Copy link

Version

6.0.0-beta.21

Browser and OS info

Windows 10

Steps to reproduce

Vue project which includes devtool-api 6.0.0-beta.21.
Run "vue-cli-service build" to build your project.
See exception:

ERROR  Failed to compile with 1 error2:55:47 PM
14:55:47   
14:55:47    error  in ./node_modules/@vue/devtools-api/lib/esm/proxy.js
14:55:47   
14:55:47   Module parse failed: Unexpected token (3:10)
14:55:47   You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
14:55:47   | import { HOOK_PLUGIN_SETTINGS_SET } from './const';
14:55:47   | export class ApiProxy {
14:55:47   >     target;
14:55:47   |     targetQueue;
14:55:47   |     proxiedTarget;
14:55:47   
14:55:47    @ ./node_modules/@vue/devtools-api/lib/esm/index.js 3:0-35 14:40-48
14:55:47    @ ./node_modules/vue-router/dist/vue-router.esm-bundler.js
14:55:47    @ ./Mouseflow.App.Web/js/vue_input/router.js
14:55:47    @ ./Mouseflow.App.Web/js/vue_input/main.js
14:55:47    @ multi ./Mouseflow.App.Web/js/vue_input/main.js

What is expected?

class ApiProxy {
    constructor(plugin, hook) {
        this.target = null;
        this.targetQueue = [];
        this.onQueue = [];
        this.plugin = plugin;
        this.hook = hook;
...

What is actually happening?

class ApiProxy {
    target;
    targetQueue;
    proxiedTarget;
    onQueue;
    proxiedOn;
    plugin;
    hook;
    fallbacks;
    constructor(plugin, hook) {
        this.target = null;
        this.targetQueue = [];
        this.onQueue = [];
        this.plugin = plugin;
        this.hook = hook;
...
@leolivier
Copy link

Same here. I removed the lines pointed by @thomasbalsloev (before the constructor) and it compiled again

@havist
Copy link

havist commented Dec 20, 2021

Same issue here. Maybe the wrong build?

@kyrsquir
Copy link

kyrsquir commented Dec 20, 2021

Adding this to package.json helped me as a temporary solution (only works with yarn):

"resolutions": {
  "@vue/devtools-api": "6.0.0-beta.20.1"
}

@havist
Copy link

havist commented Dec 20, 2021

Yes, it does. Same for npm with npm install @vue/[email protected] --save-dev.
But this is not applicable for our micro frontend world, where we have dozens of such projects. I mean, it has to be fixed quickly.

@kyrsquir
Copy link

kyrsquir commented Dec 20, 2021

Direct installation of an older version only seems to help if you explicitly depend on @vue/devtools-api. For me the dependency is coming from vue-router and vuex

@havist
Copy link

havist commented Dec 20, 2021

That's exactly what I said. It cannot be fixed so, it's only a quick fix applicable to a single project at all.
Of course we have this dependency transitive as well from the 3rd party projects.

@Akryum Akryum closed this as completed in 0935275 Dec 20, 2021
@Akryum
Copy link
Member

Akryum commented Dec 20, 2021

I released an hotfix version 6.0.0-beta.21.1

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

5 participants