wechaty / getting-started

A Starter Project Template for Wechaty works out-of-the-box
https://gitpod.io/#https://github.com/wechaty/wechaty-getting-started
Apache License 2.0
774 stars 342 forks source link

Cannot find package 'ts-node' imported from #244

Closed tianrking closed 2 years ago

tianrking commented 2 years ago

I have install ts-node via sudo npm install -g ts-node , however the problem is still here

node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'ts-node' imported from /home/w0x7ce/Desktop/day1/getting-started/

i installed cross-env via sudo npm install --global cross-env to solve the default problem " sh: 1: cross-env: not found"

Rossonero commented 2 years ago

fixed: npm i ts-node -D

huan commented 2 years ago

I believe with Node.js v16+, after running npm install under this repo folder, the ts-node will be installed automatically because it's a dependency of @chatie/tsconfig.

Please let me know your Node.js version if it doesn't.

tianrking commented 2 years ago

thx it works well

Z2316914847 commented 1 year ago

I believe with Node.js v16+, after running under this repo folder, the will be installed automatically because it's a dependency of .npm install``ts-node``@chatie/tsconfig

Please let me know your Node.js version if it doesn't.

node js 18.15.0

skys215 commented 1 year ago

Since @swc/core 1.3.46, it requires @swc/helpers 0.5. But @chatie/tsconfig 4.9.2 requires @swc/core ^1.3.38 which include @swc/helpers ^0.4.14. Which made the conflict and cause fail while npm install.

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @swc/core@1.3.62
npm WARN Found: @swc/helpers@0.4.14
npm WARN node_modules/@chatie/tsconfig/node_modules/@swc/helpers
npm WARN   @swc/helpers@"^0.4.14" from @chatie/tsconfig@4.9.2
npm WARN   node_modules/@chatie/tsconfig
npm WARN     dev @chatie/tsconfig@"^4.6.2" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peerOptional @swc/helpers@"^0.5.0" from @swc/core@1.3.62
npm WARN node_modules/@chatie/tsconfig/node_modules/@swc/core
npm WARN   @swc/core@"^1.3.38" from @chatie/tsconfig@4.9.2
npm WARN   node_modules/@chatie/tsconfig
npm WARN   1 more (ts-node)
npm WARN
npm WARN Conflicting peer dependency: @swc/helpers@0.5.1
npm WARN node_modules/@swc/helpers
npm WARN   peerOptional @swc/helpers@"^0.5.0" from @swc/core@1.3.62
npm WARN   node_modules/@chatie/tsconfig/node_modules/@swc/core
npm WARN     @swc/core@"^1.3.38" from @chatie/tsconfig@4.9.2
npm WARN     node_modules/@chatie/tsconfig
npm WARN     1 more (ts-node)