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

Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (2:0) #189

Open
Mergemat opened this issue Dec 26, 2023 · 1 comment

Comments

@Mergemat
Copy link

env:
node 20.9.0
next 14.0.5-canary.23

issue when using import { SiweMessage } from "siwe"

trace:

 ⨯ ../../node_modules/ethers/lib.commonjs/abi/abi-coder.js
Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (2:0)
| "use strict";
> import { _ as _class_private_method_get } from "@swc/helpers/_/_class_private_method_get";
| import { _ as _class_private_method_init } from "@swc/helpers/_/_class_private_method_init";
| /**
@basis/nextjs:dev:
Import trace for requested module:
../../node_modules/ethers/lib.commonjs/abi/abi-coder.js
../../node_modules/ethers/lib.commonjs/abi/index.js
../../node_modules/ethers/lib.commonjs/ethers.js
../../node_modules/ethers/lib.commonjs/index.js
../../node_modules/siwe/dist/utils.js
../../node_modules/siwe/dist/siwe.js
../../packages/web3/src/index.tsx
../../packages/web3/index.ts
./src/app/providers.tsx
@dankcellar
Copy link

Try this: #136 (comment)

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