Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module '../node_modules/@teambit/bit/dist/app' #8943

Open
StarHosea opened this issue Jun 7, 2024 · 4 comments
Open

Cannot find module '../node_modules/@teambit/bit/dist/app' #8943

StarHosea opened this issue Jun 7, 2024 · 4 comments
Labels

Comments

@StarHosea
Copy link

StarHosea commented Jun 7, 2024

Describe the bug

cannot run any bit command in the new worksacpe created by bit

Steps to Reproduce

  1. bit new react bit-demo-base --env bitdev.react/react-env --log=error
  2. cd bit-demo-base
  3. 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
@StarHosea StarHosea changed the title failed to create new worksapce cannot run any bit command in the new worksacpe created by bit Jun 7, 2024
@GiladShoham
Copy link
Member

Please try to re-install bit by
Bvm install --override

@StarHosea
Copy link
Author

Thank you for your response. I fixed it by using pnpm install, though I'm not sure why that worked.

@StarHosea StarHosea reopened this Jun 18, 2024
@StarHosea
Copy link
Author

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'
  ]
}

@StarHosea StarHosea changed the title cannot run any bit command in the new worksacpe created by bit Cannot find module '../node_modules/@teambit/bit/dist/app' Jun 18, 2024
@AlexanderBich
Copy link

Same thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants