weexteam / A-pack-tool-for-Apache-Weex

A pack tool for Android、iOS and H5 plartform of Weex. This tool is a third party work, and is not developed nor maintained by Apache Weex.
Apache License 2.0
611 stars 76 forks source link

same error occured using weexpack run ios and weexpack run android #225

Closed mrarronz closed 6 years ago

mrarronz commented 6 years ago

module.js:557 throw err; ^

Error: Cannot find module 'chokidar' at Function.Module._resolveFilename (module.js:555:15) at Function.Module._load (module.js:482:25) at Module.require (module.js:604:17) at require (internal/module.js:11:18) at Object. (/usr/local/lib/node_modules/weexpack/lib/run/android.js:11:16) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3)

mrarronz commented 6 years ago

according to the error message, I installed the chokidar module by 'npm install chokidar --save', then run ios again with command 'weexpack run ios', still failed with the error above

weenta commented 6 years ago

the same question

AdhocXiaoxu commented 6 years ago

userdeMac-mini:weex-adhoc-test xiaoxu$ weexpack run ios module.js:538 throw err; ^

Error: Cannot find module 'chokidar' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at Object. (/usr/local/lib/node_modules/weexpack/lib/run/android.js:11:16) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3)

AdhocXiaoxu commented 6 years ago

npm install weexpack 和npm install -g weexpack 是有区别的,当前这个问题的解决方案是找到usr/local/lib/node_modules文件,删掉里面的weexpack文件夹,然后执行npm install -g weexpack重新安装weexpack就可以了

stephenwong1991 commented 6 years ago

@AdhocXiaoxu 照着楼上同学的做法试了一下,问题依然没有解决,不知为何