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

Cannot use import statement outside a module #725

Closed
jrnxf opened this issue Nov 10, 2022 · 1 comment
Closed

Cannot use import statement outside a module #725

jrnxf opened this issue Nov 10, 2022 · 1 comment

Comments

@jrnxf
Copy link
Contributor

jrnxf commented Nov 10, 2022

I just upgraded to 5.3.0 and am now this when running my application. The issue goes away when downgrading back to 5.2.2.

/Users/colby/Dev/pocus/frontend/node_modules/.pnpm/emoji-mart@5.3.0/node_modules/emoji-mart/dist/main.js:16
import "75afa6943437e26f:@swc/helpers/lib/_assert_this_initialized.js:esm";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1088:15)
    at Module._compile (node:internal/modules/cjs/loader:1123:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/colby/Dev/pocus/frontend/node_modules/.pnpm/@emoji-mart+react@1.0.1_m6ruxpxsd7qw3el52z6plcuz4a/node_modules/@emoji-mart/react/dist/main.js:2:24)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
error - uncaughtException: /Users/colby/Dev/pocus/frontend/node_modules/.pnpm/emoji-mart@5.3.0/node_modules/emoji-mart/dist/main.js:16
import "75afa6943437e26f:@swc/helpers/lib/_assert_this_initialized.js:esm";
@EtienneLem
Copy link
Member

Looks like a Parcel bug… some import did make it into main.js which is supposed to be the no-module build. Upgrading Parcel to latest version seems to resolve this. Just released v5.3.1, is it working now on your end?

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