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

ERR_PACKAGE_PATH_NOT_EXPORTED #226

Open realdengziqi opened 2 years ago

realdengziqi commented 2 years ago

npm start

CustomError: ERR_PACKAGE_PATH_NOT_EXPORTED /home/lighthouse/moudle/getting-started-main/node_modules/wechaty-puppet/ ./types /home/lighthouse/moudle/getting-started-main/node_modules/wechaty/dist/esm/src/mods/mod.js
    at throwExportsNotFound (/home/lighthouse/moudle/getting-started-main/node_modules/ts-node/dist-raw/node-esm-resolve-implementation.js:397:9)
    at packageExportsResolve (/home/lighthouse/moudle/getting-started-main/node_modules/ts-node/dist-raw/node-esm-resolve-implementation.js:622:3)
    at packageResolve (/home/lighthouse/moudle/getting-started-main/node_modules/ts-node/dist-raw/node-esm-resolve-implementation.js:763:14)
    at moduleResolve (/home/lighthouse/moudle/getting-started-main/node_modules/ts-node/dist-raw/node-esm-resolve-implementation.js:815:18)
    at Object.defaultResolve (/home/lighthouse/moudle/getting-started-main/node_modules/ts-node/dist-raw/node-esm-resolve-implementation.js:929:11)
    at /home/lighthouse/moudle/getting-started-main/node_modules/ts-node/src/esm.ts:152:38
    at Generator.next (<anonymous>)
    at /home/lighthouse/moudle/getting-started-main/node_modules/ts-node/dist/esm.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/lighthouse/moudle/getting-started-main/node_modules/ts-node/dist/esm.js:4:12)
huan commented 2 years ago

The latest commit should solve your problem.

Please run the below commands and let me know if it fixes this issue:

git pull
rm -fr node_modules package-lock.json
npm install
npm start