当我尝试为离子项目提供服务时,我发现了以下错误。
Error: Cannot find module '/Users/SampathM/thotilla/node_modules/@ionic/app-scripts'
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.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:9:16)
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:107:75
at new Promise (<anonymous>)
at Object.__awaiter (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:103:16)
at Object.importAppScripts (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:7:20)
如何解决这个问题?
答案 0 :(得分:-1)
我遇到了同样的问题并且我正在执行它:
npm i -g @ionic/app-scripts
使用sudo su
授予root权限后
希望有所帮助