monaca preview error
-
I use monaca CLI to create a project with " Onsen UI and React " category,
and " Onsen UI v2 React Minimum " template.
But when I run " monaca preview “,
It replied:
” Failed serving project: Cannot find module ‘tapable’ "I tried to run " monaca debug "
and It became:
Running Transpiler…
module.js:457
throw err;
^Error: Cannot find module 'tapable’
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/MYUSERNAME/.cordova/node_modules/webpack/lib/Compiler.js:6:15)
at Module._compile (module.js:556:32)
at Object.Module._extensions…js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)I tried this on both MacOS Yosemite and Windows 10,
and both npm 2.15.9 and npm 3.10.3,
All the same problem…Does anyone ever met the same problem and resolved it , Please help me, please.
Thank you.
-
OK, I found I just need to goto /Users/MYUSERNAME/.cordova/ directory and run " npm install --save tapable " and then anything goes well.
Hope it helps somebody with the same problem^^