Open cacacaio opened 7 months ago
Try bun install -d ajv
per https://github.com/expo/expo/issues/26641
I encountered the same issue with storybook. To reproduce:
$ git clone git@github.com:mantinedev/next-app-template.git
$ cd next-app-template
$ bun i
$ bun storybook
> mantine-next-template@1.0.0 storybook
> storybook dev -p 6006
@storybook/cli v8.1.10
info => Starting manager..
info => Starting preview..
info Addon-docs: using MDX3
info => Using implicit CSS loaders
=> Failed to build the preview
Error: Cannot find module 'ajv/dist/compile/codegen'
Require stack:
- ./node_modules/ajv-keywords/dist/definitions/typeof.js
- ./node_modules/ajv-keywords/dist/keywords/typeof.js
- ./node_modules/ajv-keywords/dist/keywords/index.js
- ./node_modules/ajv-keywords/dist/index.js
- ./node_modules/schema-utils/dist/validate.js
- ./node_modules/schema-utils/dist/index.js
- ./node_modules/webpack-dev-middleware/dist/index.js
- ./node_modules/@storybook/builder-webpack5/dist/index.js
- ./node_modules/@storybook/nextjs/dist/preset.js
- ./node_modules/@storybook/core-common/dist/index.js
- ./node_modules/@storybook/telemetry/dist/index.js
- ./node_modules/@storybook/cli/dist/generate.js
- ./node_modules/@storybook/cli/bin/index.js
- ./node_modules/storybook/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
at Module._resolveFilename (./node_modules/esbuild-register/dist/node.js:4799:36)
at <anonymous> (./node_modules/next/src/server/require-hook.ts:51:34)
at Module._load (node:internal/modules/cjs/loader:984:27)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at Module.mod.require (./node_modules/next/src/server/require-hook.ts:70:26)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (./node_modules/ajv-keywords/src/definitions/typeof.ts:2:1)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
I hope @Jarred-Sumner , @dylan-conway , @paperdave , @Electroid, or one of the other maintainers can solve it soon!
@tianhuil what version of bun are you using? This should've been fixed with #11473
What version of Bun is running?
1.1.7+b0b7db5c0
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
I just went into a expo project and used
bun install
and then went ahead and bun start to run the expo start script on package.json and it gave me this error.What is the expected behavior?
The project ran as normal.
What do you see instead?
Additional information
I tried running bun create expo app-name and it works as normal so I don't know what's causing that in the app in question since it isn't everything out of the ordinary. These are the libs i'm running