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

acornInjectPlugins: Class constructor cannot be invoked without 'new' #3405

Open
ghost opened this issue Feb 27, 2020 · 1 comment
Open

acornInjectPlugins: Class constructor cannot be invoked without 'new' #3405

ghost opened this issue Feb 27, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 27, 2020

This is the same as #3015 but that issue was closed by the person who made it with no reply.

Expected Behavior

C:\rollup-constructor-bug>yarn rollup -c
yarn run v1.19.1
warning package.json: No license field
$ C:\rollup-constructor-bug\node_modules\.bin\rollup -c

input.js → stdout...

(!) Generated an empty chunk
input
created stdout in 14ms
Done in 0.22s.

Actual Behavior

C:\rollup-constructor-bug>yarn rollup -c
yarn run v1.19.1
$ C:\rollup-constructor-bug\node_modules\.bin\rollup -c

input.js → stdout...
[!] Error: Class constructor  cannot be invoked without 'new'
Error: Class constructor  cannot be invoked without 'new'
    at error (C:\rollup-constructor-bug\node_modules\rollup\dist\shared\node-entry.js:5400:30)
    at Module.error (C:\rollup-constructor-bug\node_modules\rollup\dist\shared\node-entry.js:9820:16)
    at tryParse (C:\rollup-constructor-bug\node_modules\rollup\dist\shared\node-entry.js:9713:23)
    at Module.setSource (C:\rollup-constructor-bug\node_modules\rollup\dist\shared\node-entry.js:10076:33)
    at C:\rollup-constructor-bug\node_modules\rollup\dist\shared\node-entry.js:12362:20
    at async Promise.all (index 0)
    at async Promise.all (index 0)
    at async Promise.all (index 0)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@ghost
Copy link
Author

ghost commented Feb 27, 2020

This is console.log of err at node-entry.js:9714 which provides additional info

TypeError: Class constructor  cannot be invoked without 'new'
    at new _class (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn-dynamic-import\lib\index.js:53:99)
    at new <anonymous> (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn-import-meta\index.js:15:10)
    at new <anonymous> (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn-bigint\index.js:8:10)
    at new Parser (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn-private-class-elements\index.js:26:12)
    at new <anonymous> (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn-class-fields\index.js:18:10)
    at new <anonymous> (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn-static-class-features\index.js:22:10)
    at new <anonymous> (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn-private-methods\index.js:8:10)
    at new <anonymous> (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn-export-ns-from\index.js:8:10)
    at Function.parse (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\acorn\dist\acorn.js:575:10)
    at tryParse (C:\Users\Admin\Documents\Projects\rollup-constructor-bug\node_modules\rollup\dist\shared\node-entry.js:9703:23)

@ghost ghost changed the title Using acorn-stage3 in acornInjectPlugins causes Error acornInjectPlugins: Class constructor cannot be invoked without 'new' Feb 27, 2020
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

0 participants