Skip to content

Module not found in Next13 #837

@Nfinished

Description

@Nfinished

Node v18.12.1
Next v13.3.0
pnpm v 8.1.1

segment.ts is poisoned with client-only
Segment.tsx is a client component

warn  - ./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/home/nfinished/upwell.gg/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/@[email protected]/node_modules/@segment/analytics-next/dist/cjs/plugins/analytics-node/index.js
./node_modules/.pnpm/@[email protected]/node_modules/@segment/analytics-next/dist/cjs/node/index.js
./node_modules/.pnpm/@[email protected]/node_modules/@segment/analytics-next/dist/cjs/index.js
./utils/segment.ts
./app/Segment.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions