-
Notifications
You must be signed in to change notification settings - Fork 20
Not compatible with Webpack 5 (Next.js 11) #122
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Expected Behavior
Shouldn't log warnings
Current Behavior
When importing the file import { init } from '@amplitude/node';, it yields the following output:
warn - ./node_modules/@amplitude/node/esm/src/constants.js
Should not import the named export 'version' (reexported as 'SDK_VERSION') from default-exporting module (only default export is available soon)
It's hard to tell if it's a warning or an error. The warning is displayed at every rebuild.
It seems to be related to webpack 5, the @amplitude/node package might not be compatible with Webpack 5. This affects Next.js 10+. (Webpack 5 is enabled by default in Next.js 11)
Steps to Reproduce
git clone git@github.com:UnlyEd/next-right-now.git nrn-refactor-amplitude && cd nrn-refactor-amplitude && git checkout refactor-amplitude && cp .env.local.example .env.local && yarn && yarn start- Go to
localhost:8888/api/statusand look at the server console
Environment
- SDK Version: "@amplitude/node": "1.6.1",
- Node version: v14
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
