Cannot run yarn dev or yarn build due to Cannot find package 'rxjs' imported from 'node_modules/@crxjs/vite-plugin/dist/index.mjs' error.
'rxjs' should be a normal dependency instead of being a dev dependency.
Reproduction
As per the 'Get started with React' guide:
yarn create vite
cd into directory
yarn install
yarn add -D @crxjs/vite-plugin@beta
Create manifest.json and update vite.config.js
yarn dev
Logs
mindflayerfr@mindflayerfr-d1:~/crxjs-bug/chrome-extension$ yarn dev
yarn run v1.22.19
$ vite
failed to load config from /home/mindflayerfr/crxjs-bug/chrome-extension/vite.config.ts
error when starting dev server:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'rxjs' imported from /home/mindflayerfr/crxjs-bug/chrome-extension/node_modules/@crxjs/vite-plugin/dist/index.mjs
at new NodeError (node:internal/errors:387:5)
at packageResolve (node:internal/modules/esm/resolve:852:9)
at moduleResolve (node:internal/modules/esm/resolve:901:20)
at defaultResolve (node:internal/modules/esm/resolve:1115:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:837:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Build tool
Vite
Where do you see the problem?
Describe the bug
Cannot run
yarn dev
oryarn build
due toCannot find package 'rxjs' imported from 'node_modules/@crxjs/vite-plugin/dist/index.mjs'
error.'rxjs' should be a normal dependency instead of being a dev dependency.
Reproduction
As per the 'Get started with React' guide:
yarn create vite
cd
into directoryyarn install
yarn add -D @crxjs/vite-plugin@beta
manifest.json
and updatevite.config.js
yarn dev
Logs
System Info
Severity
blocking all usage of RPCE