azu / commonjs-to-es-module-codemod

Codemod that convert CommonJS(require/exports) to ES Modules(import/export) for JavaScript/TypeScript
MIT License
80 stars 15 forks source link

Error: Cannot find module 'jscodeshift' #18

Closed Fab10-OpenTable closed 1 year ago

Fab10-OpenTable commented 1 year ago

I am trying to follow the instructions that I am getting this error. Any suggestion? I am using node v18

Error: Cannot find module 'jscodeshift'
Require stack:
- /private/var/folders/r9/0wyqy74d7630p6sxb_cfvrgr0000gp/T/jscodeshift202317-80737-16g8is6.q5z5.js
- /Users/<USER>/.nvm/versions/node/v18.12.1/lib/node_modules/jscodeshift/src/Worker.js
azu commented 1 year ago

Thanks.

It will be fixed in https://github.com/azu/commonjs-to-es-module-codemod/releases/tag/v0.5.6

Please try it.

jscodeshift -t "https://unpkg.com/commonjs-to-es-module-codemod@0.5.6/dist/index.js" "index.js"
Fab10-OpenTable commented 1 year ago

thank you too