osmosis-labs / osmojs

OsmosJS makes it easy to compose and broadcast Osmosis and Cosmos messages
https://cosmology.zone/products/osmojs
Apache License 2.0
63 stars 32 forks source link

Nextjs Module import error with `osmojs@16.10.0` and `osmojs@16.9.2`. Version `osmojs@16.9.0` doesnt create this error. #90

Open MbBrainz opened 7 months ago

MbBrainz commented 7 months ago

When running pnpm build, the build process fails with the error below. Shows for both osmojs@16.10.0 and osmojs@16.9.2 but not for osmojs@16.9.0

app/node_modules/.pnpm/osmojs@16.10.0/node_modules/osmojs/dist/codegen/cosmos/staking/v1beta1/staking.js:1
fortytwo-app:build: import { Header } from "../../../tendermint/types/types";
fortytwo-app:build: ^^^^^^
fortytwo-app:build: 
fortytwo-app:build: SyntaxError: Cannot use import statement outside a module
fortytwo-app:build:     at internalCompileFunction (node:internal/vm:77:18)
fortytwo-app:build:     at wrapSafe (node:internal/modules/cjs/loader:1290:20)
fortytwo-app:build:     at Module._compile (node:internal/modules/cjs/loader:1342:27)
fortytwo-app:build:     at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
fortytwo-app:build:     at Module.load (node:internal/modules/cjs/loader:1212:32)
fortytwo-app:build:     at Module._load (node:internal/modules/cjs/loader:1028:12)
fortytwo-app:build:     at Module.require (node:internal/modules/cjs/loader:1237:19)
fortytwo-app:build:     at require (node:internal/modules/helpers:176:18)
MbBrainz commented 6 months ago

@pyramation Any idea what caused this issue?