Description
mac系统sudo week create weexproject创建项目报错Cannot find module 'commander',从windows拷贝一个能用创建好的项目过来运行项目week run iOS 也报同样的错
sudo weex create weex-study2
Password:
module.js:549
{{throw err; ^ }}
Error: Cannot find module 'commander'
at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/yuanhl/.xtoolkit/node_modules/weexpack/bin/weexpack-create.js:3:17) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Command.immediateStart (/usr/local/lib/node_modules/weex-toolkit/node_modules/xtoolkit/lib/Command.js:103:5) at Command._invoke (/usr/local/lib/node_modules/weex-toolkit/node_modules/xtoolkit/lib/Command.js:81:14) at Command.run (/usr/local/lib/node_modules/weex-toolkit/node_modules/xtoolkit/lib/Command.js:53:12) at XToolkit._runCmd (/usr/local/lib/node_modules/weex-toolkit/node_modules/xtoolkit/lib/xtoolkit.js:179:27) at XToolkit._done (/usr/local/lib/node_modules/weex-toolkit/node_modules/xtoolkit/lib/xtoolkit.js:196:12) at process.nextTick (/usr/local/lib/node_modules/weex-toolkit/node_modules/xtoolkit/lib/xtoolkit.js:131:14) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (module.js:695:11) at startup (bootstrap_node.js:191:16)
按网上说的单独安装commander,npm i commander -g错误依旧