bit
bit copied to clipboard
Missing dependencies for bit run app
Getting these errors when running bit app:
Error: Cannot find module 'webpack'
...
ERROR in ./node_modules/.pnpm/[email protected]/node_modules/graphql-tag/lib/index.js 2:0-32
Module not found: Error: Can't resolve 'graphql' in '/Users/kutner/projects/bit-uis/blog/node_modules/.pnpm/[email protected]/node_modules/graphql-tag/lib'
resolve 'graphql' in '/Users/kutner/projects/bit-uis/blog/node_modules/.pnpm/[email protected]/node_modules/graphql-tag/lib'
...
Error: Can't resolve 'subscriptions-transport-ws' in '/Users/kutner/projects/bit-uis/blog/node_modules/.pnpm/registry.npmjs.org+@[email protected][email protected]/node_modules/@apollo/client/link/ws'
resolve 'subscriptions-transport-ws' in '/Users/kutner/projects/bit-uis/blog/node_modules/.pnpm/registry.npmjs.org+@[email protected][email protected]/node_modules/@apollo/client/link/ws'
Parsed request is a module
using description file: /Users/kutner/projects/bit-uis/blog/node_modules/.pnpm/registry.npmjs.org+@[email protected][email protected]/node_modules/@apollo/client/link/ws/package.json
Some of these make sense - they are indirect peer dependencies of the code, like webpack and graphql.
However subscriptions-transport-ws
is a dependency of bit, and should not appear here.
Steps to Reproduce
-
bit import teambit.cloud/apps/bit-cloud
-
bit install webpack
(or the process won't even start) -
bit run bit-cloud-blog
- wait for it..
- --> getting the errors
Expected Behavior
Should install or warn about the missing the dependencies.
Screenshots, exceptions and logs
Specifications
- Bit version: 726
- Workspace type: harmony
- Node version: 12.22.10
- Platform: MacOS
might be fixed by #6003
Same mistake.
bit version:
bit list:
this is a resolve of a missing peerDep, which was defined for in the env.
to get these deps auto-installed, set rootComponents:true
in workspace.jsonc
.