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 'chalk' #139

Open
kevinfarrugia opened this issue Aug 30, 2021 · 0 comments
Open

Cannot find module 'chalk' #139

kevinfarrugia opened this issue Aug 30, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@kevinfarrugia
Copy link

When running ts-migrate on the root of a project, using:

npx -p ts-migrate -c "ts-migrate-full ./"

I receive the error:

[Step 1 of 4] Initializing ts-config for the "./"...

internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'chalk'
Require stack:
- /my-project/node_modules/updatable-log/index.js
- /my-project/node_modules/ts-migrate/build/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/my-project/node_modules/updatable-log/index.js:2:15)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/my-project/node_modules/updatable-log/index.js',
    '/my-project/node_modules/ts-migrate/build/cli.js'
  ]
}

After installing chalk manually, using npm install chalk I get a similar error for escape-string-regexp, ansi-styles, color-convert...etc.

When prompted, I selected the option to use the default path for the typescript compiler.

Thank you

@Rudeg Rudeg added the bug Something isn't working label Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants