Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

next js example does not work #266

Open
AtlasPilotPuppy opened this issue Mar 30, 2022 · 5 comments
Open

next js example does not work #266

AtlasPilotPuppy opened this issue Mar 30, 2022 · 5 comments

Comments

@AtlasPilotPuppy
Copy link

It throws an in initialization

Unhandled Runtime Error
TypeError: PubsubRouter is not a constructor

Call Stack
pubsubAdapter
node_modules/libp2p/src/pubsub-adapter.js (17:0)
new Libp2p
node_modules/libp2p/src/index.js (334:0)
Function.create
node_modules/libp2p/src/index.js (142:0)
createLibp2p
node_modules/ipfs-core/esm/src/components/libp2p.js (35:9)
configureRepo
node_modules/ipfs-core/esm/src/components/storage.js (137:35)
async loadRepo
node_modules/ipfs-core/esm/src/components/storage.js (51:0)
async Function.start
node_modules/ipfs-core/esm/src/components/storage.js (37:36)
async create
node_modules/ipfs-core/esm/src/components/index.js (275:0)
@mingderwang
Copy link

mingderwang commented Apr 2, 2022

We have to same error.

@cppshane
Copy link

cppshane commented Apr 3, 2022

Same issue on the Angular example.

@danielfalbo
Copy link

I can't compile it either, but I get a different error:

> [email protected] build
> next build && next export -o dist

info  - Checking validity of types...
info  - Creating an optimized production build...
info  - Compiled successfully
info  - Collecting page data...

> Build error occurred
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (/vercel/path0/node_modules/timeout-abort-controller/index.js:8:33)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
at async Loader.import (internal/modules/esm/loader.js:178:24) {
type: 'TypeError'
Error: Command "npm run build" exited with 1

Looks like this happens when one circularly imports classes

I spent a lot of time on this but couldn't get it to work, I need help. Thank you :)

@danielfalbo
Copy link

Forgot a very important detail: no issues compiling locally on my machine, only get the error on the Vercel deployment

@stoplion
Copy link

stoplion commented May 9, 2022

Same error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants