Cannot find module '../node_modules/@teambit/bit/dist/app'
StarHosea opened this issue · 4 comments
StarHosea commented
Describe the bug
cannot run any bit command in the new worksacpe created by bit
Steps to Reproduce
- bit new react bit-demo-base --env bitdev.react/react-env --log=error
- cd bit-demo-base
- bit install
Expected Behavior
work ok
Screenshots, exceptions and logs
cannot run any bit command
node:internal/modules/cjs/loader:1031
throw err;
^
Error: Cannot find module '../node_modules/@teambit/bit/dist/app'
Require stack:
- /Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js:3:1)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js'
]
}
muhaoxing@StarMacBook-Pro bit-demo-base % bit install
node:internal/modules/cjs/loader:1031
throw err;
^
Error: Cannot find module '../node_modules/@teambit/bit/dist/app'
Require stack:
- /Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js:3:1)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js'
]
}
muhaoxing@StarMacBook-Pro bit-demo-base % bit status
node:internal/modules/cjs/loader:1031
throw err;
^
Error: Cannot find module '../node_modules/@teambit/bit/dist/app'
Require stack:
- /Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js:3:1)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/muhaoxing/.bvm/versions/1.7.3/bit-1.7.3/node_modules/@teambit/legacy/bin/bit.js'
]
}
Specifications
- Bit version: 1.7.3
- Workspace type: bitdev.react/react-env
- Node version: v16.20.2
- npm / yarn version: npm v8.19.4
- Platform: MacOs
GiladShoham commented
Please try to re-install bit by
Bvm install --override
StarHosea commented
Thank you for your response. I fixed it by using pnpm install, though I'm not sure why that worked.
StarHosea commented
appear again
muhaoxing@StarMacBook-Pro bit-demo-base % bit install
node:internal/modules/cjs/loader:1031
throw err;
^
Error: Cannot find module '../node_modules/@teambit/bit/dist/app'
Require stack:
- /Users/muhaoxing/.bvm/versions/1.7.17/bit-1.7.17/node_modules/@teambit/legacy/bin/bit.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/Users/muhaoxing/.bvm/versions/1.7.17/bit-1.7.17/node_modules/@teambit/legacy/bin/bit.js:3:1)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/muhaoxing/.bvm/versions/1.7.17/bit-1.7.17/node_modules/@teambit/legacy/bin/bit.js'
]
}
AlexanderBich commented
Same thing