serve
离子2 app。
'looking for modules in app
app/ionic-anguler doesn't exist (module as directory)
resolve 'file' ionic-anguler in app
resolve file
app/ionic-anguler doesn't exist
app/ionic-anguler.js doesn't exist'
任何人都可以帮助我。谢谢
home.js
import {Page, NavController} from 'ionic-angular';
import {Page2} from '../page2/page2';
@Page({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
static get parameters(){
return [[NavController]];
}
constructor(nav){
this.nav = nav;
}
go_to_page_2(){
this.nav.push(Page2);
}
}
错误日志
./app/pages/home/home.js
Module not found: Error: Cannot resolve module 'ionic-anguler' in /Users/kosala/Desktop/IonicProjects/test_three/app/app/pages/home
resolve module ionic-anguler in /Users/kosala/Desktop/IonicProjects/test_three/app/app/pages/home
looking for modules in app
app/ionic-anguler doesn't exist (module as directory)
resolve 'file' ionic-anguler in app
resolve file
app/ionic-anguler doesn't exist
app/ionic-anguler.js doesn't exist
looking for modules in /Users/kosala/Desktop/IonicProjects/test_three/app/node_modules
/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler doesn't exist (module as directory)
resolve 'file' ionic-anguler in /Users/kosala/Desktop/IonicProjects/test_three/app/node_modules
resolve file
/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler doesn't exist
/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler.js doesn't exist
[app/ionic-anguler]
[app/ionic-anguler]
[app/ionic-anguler.js]
[/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler]
[/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler]
[/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler.js]
@ ./app/pages/home/home.js 12:20-44,./app/pages/page2/page2.js
Module not found: Error: Cannot resolve module 'ionic-anguler' in /Users/kosala/Desktop/IonicProjects/test_three/app/app/pages/page2
resolve module ionic-anguler in /Users/kosala/Desktop/IonicProjects/test_three/app/app/pages/page2
looking for modules in app
resolve 'file' ionic-anguler in app
resolve file
app/ionic-anguler doesn't exist
app/ionic-anguler.js doesn't exist
app/ionic-anguler doesn't exist (module as directory)
looking for modules in /Users/kosala/Desktop/IonicProjects/test_three/app/node_modules
resolve 'file' ionic-anguler in /Users/kosala/Desktop/IonicProjects/test_three/app/node_modules
resolve file
/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler doesn't exist
/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler.js doesn't exist
/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler doesn't exist (module as directory)
[app/ionic-anguler]
[app/ionic-anguler.js]
[app/ionic-anguler]
[/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler]
[/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler.js]
[/Users/kosala/Desktop/IonicProjects/test_three/app/node_modules/ionic-anguler]
@ ./app/pages/page2/page2.js 10:20-44 (CLI v2.0.0-beta.19)
答案 0 :(得分:1)
你已经检查了这个吗?即将到来的Ionic 2 Starter Change https://forum.ionicframework.com/t/attention-upcoming-ionic-2-starter-changes/45058
答案 1 :(得分:0)
你有一个错字。应该是ionic-angular
而不是ionic-anguler
。