I get below error suddenly, when I cleaned my node modules and ran ionic serve.
Error: Cannot find module 'E:\xxxx\_work\10\s\xx\ff\dfd\node_modules\ionic'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at C:\Users\4333\AppData\Roaming\npm\node_modules\ionic\bin\ionic:18:13 code: 'MODULE_NOT_FOUND' }
You would have upgraded your ionic to 3, on your new npm install. so you need to install ionic 2 globally and locally.
Try
npm install ionic@2.1.0
and
npm install -g ionic@2.1.0
Check your package.json, change the "ionic": "^2.1.0"
to "ionic": "2.1.0"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.