#node.js #angular #ionic-framework #ionic3 #ionic4
#node.js #angular #ionic-framework #ionic3 #ionic4
Вопрос:
Я клонировал ионный проект онлайн, который работает для других, но когда я делаю ionic serve
, я получаю следующие ошибки. На сайте указано, что он запущен, но в журнале есть множество ошибок, и переход на сайт просто показывает те же ошибки.
У меня есть узел 10.16.0, и он использует кодовую базу Angular 5.2.0 и Ionic. Я выполнил команду sudo npm install -g cordova@8.0.0 ionic@4.0.1
, которая, как мне кажется, также была необходима.
И, глядя на package.json, я вижу "angularfire2": "5.3.0"
ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] [19:39:42] ionic-app-scripts 3.2.4
[app-scripts] [19:39:42] watch started ...
[app-scripts] [19:39:42] build dev started ...
[app-scripts] [19:39:42] clean started ...
[app-scripts] [19:39:42] clean finished in 1 ms
[app-scripts] [19:39:42] copy started ...
[app-scripts] [19:39:42] deeplinks started ...
[app-scripts] [19:39:42] deeplinks finished in 242 ms
[app-scripts] [19:39:42] transpile started ...
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/auth/auth.d.ts, line: 8
[app-scripts] Cannot find name 'User'.
[app-scripts] L7: readonly auth: FirebaseAuth;
[app-scripts] L8: readonly authState: Observable<User | null>;
[app-scripts] L9: readonly idToken: Observable<string | null>;
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/auth/auth.d.ts, line: 10
[app-scripts] Cannot find name 'User'.
[app-scripts] L9: readonly idToken: Observable<string | null>;
[app-scripts] L10: readonly user: Observable<User | null>;
[app-scripts] L11: readonly idTokenResult: Observable<auth.IdTokenResult | null>;
[app-scripts] Namespace ''*'' has no exported member 'IdTokenResult'.
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/auth/auth.d.ts, line: 11
[7:49 PM]
[app-scripts] L10: readonly user: Observable<User | null>;
[app-scripts] L11: readonly idTokenResult: Observable<auth.IdTokenResult | null>;
[app-scripts] L12: constructor(options: FirebaseOptions, nameOrConfig: string | FirebaseAppConfig | null | undefined, platformId: Object, zone: NgZone);
[app-scripts] Namespace '''' has no exported member 'Database'.
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 13
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 14
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 16
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 18
[app-scripts] L12: export declare const FIREBASE_APP_NAME: InjectionToken<string | FirebaseAppConfig | undefined>;
[app-scripts] L13: export declare type FirebaseDatabase = database.Database;
[app-scripts] L14: export declare type FirebaseAuth = auth.Auth;
[app-scripts] Namespace '''' has no exported member 'Auth'.
[app-scripts] L13: export declare type FirebaseDatabase = database.Database;
[app-scripts] L14: export declare type FirebaseAuth = auth.Auth;
[app-scripts] L15: export declare type FirebaseAnalytics = any;
[app-scripts] Namespace '''' has no exported member 'Messaging'.
[app-scripts] L15: export declare type FirebaseAnalytics = any;
[app-scripts] L16: export declare type FirebaseMessaging = messaging.Messaging;
[app-scripts] L17: export declare type FirebasePerformance = any;
[app-scripts] Namespace '''' has no exported member 'Storage'.
[app-scripts] L17: export declare type FirebasePerformance = any;
[7:49 PM]
[app-scripts] L18: export declare type FirebaseStorage = storage.Storage;
[app-scripts] L19: export declare type FirebaseFirestore = firestore.Firestore;
[app-scripts] Namespace '''' has no exported member 'Firestore'.
[app-scripts] L18: export declare type FirebaseStorage = storage.Storage;
[app-scripts] L19: export declare type FirebaseFirestore = firestore.Firestore;
[app-scripts] L20: export declare type FirebaseFunctions = functions.Functions;
[app-scripts] Namespace '''' has no exported member 'Functions'.
[app-scripts] L19: export declare type FirebaseFirestore = firestore.Firestore;
[app-scripts] L20: export declare type FirebaseFunctions = functions.Functions;
[app-scripts] L21: export declare type FirebaseRemoteConfig = any;
[app-scripts] Namespace ''*'' has no exported member 'auth'.
[app-scripts] L13: // firebase auth - google - Create an instance of the Google provider object:
[app-scripts] L14: let googleProvider: firebase.auth.GoogleAuthProvider = new firebase.auth.GoogleAuthProvider();
[app-scripts] L15: // let twitterProvider: firebase.auth.TwitterAuthProvider = new firebase.auth.TwitterAuthProvider();
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 19
[app-scripts] [19:39:50] typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 20
[app-scripts] [19:39:50] typescript: src/pages/signup/signup.ts, line: 14
[7:50 PM]
[INFO] Development server running!
Local: http://localhost:8100/
External: http://192.168.86.61:8100/
DevApp: my0site@8100 on imac.lan
Use Ctrl C to quit this process
[INFO] Browser window opened to http://localhost/:8100!
[app-scripts] [19:39:50] copy finished in 8.68 s
[app-scripts] [19:39:51] watch ready in 9.22 s
Комментарии:
1. Почему бы вам не попробовать
npm install
, он установит все необходимые модули, упомянутые в package.json2. @TaylorRahul Я уже запустил установку npm. Другие разработчики запускают те же команды «git clone, npm i, ionic serve», и это работает на их компьютере, но на моем это просто не работает. у нас точно такой же package.json.
3. Может быть проблема с версией ionic и cordova. возможно, вы установили последнюю версию