amplitude / amplitude/Amplitude-Node
Not compatible with Webpack 5 (Next.js 11)
- Lingua principale
- TypeScript
- Stelle
- 73
- Fork
- 20
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## 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
1. `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`
2. Go to `localhost:8888/api/status` and look at the server console

## Environment
- SDK Version: "@amplitude/node": "1.6.1",
- Node version: v14
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.