gpt4 book ai didi

angular - 错误 : Can't resolve '@firebase/webchannel-wrapper'

转载 作者:太空狗 更新时间:2023-10-29 18:05:13 26 4
gpt4 key购买 nike

因此,我最近将 angularfire2 更新到了最新最好的版本,但遇到了一些问题。我按照 angularfire2 开发人员指南安装了项目,但仍然出现以下错误:

[18:57:50]  ionic-app-script task: "build" [18:57:50]  Error: ./node_modules/firebase/firestore/platform_browser/webchannel_connection.js Module not found: Error: 
Can't resolve '@firebase/webchannel-wrapper' in
'/Users/usr/Documents/project/node_modules/firebase/firestore/platform_browser' resolve
'@firebase/webchannel-wrapper' in
'/Users/usr/Documents/project/node_modules/firebase/firestore/platform_browser' Parsed request is
a module using description file: /Users/usr/Documents/project/node_modules/firebase/package.json
(relative path: ./firestore/platform_browser) Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/usr/Documents/project/node_modules/firebase/package.json
(relative path: ./firestore/platform_browser) resolve as module looking for modules in
/Users/usr/Documents/project/node_modules using description file:
/Users/usr/Documents/project/package.json (relative path: ./node_modules) Field 'browser' doesn't
contain a valid alias configuration after using description file:
/Users/usr/Documents/project/package.json (relative path: ./node_modules) using description file:
/Users/usr/Documents/project/package.json (relative path:
./node_modules/@firebase/webchannel-wrapper) no extension Field 'browser' doesn't contain a valid alias
configuration /Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper doesn't exist
.ts Field 'browser' doesn't contain a valid alias configuration
/Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper.ts doesn't exist .js Field
'browser' doesn't contain a valid alias configuration
/Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper.js doesn't exist .json
Field 'browser' doesn't contain a valid alias configuration
/Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper.json doesn't exist as
directory /Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper doesn't exist
[/Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper]
[/Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper.ts]
[/Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper.js]
[/Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper.json]
[/Users/usr/Documents/project/node_modules/@firebase/webchannel-wrapper] @
./node_modules/firebase/firestore/platform_browser/webchannel_connection.js 12:25-64 @
./node_modules/firebase/firestore/platform_browser/browser_platform.js @
./node_modules/firebase/firestore/platform_browser/browser_init.js @ ./node_modules/firebase/firestore.js @
./node_modules/angularfire2/firestore/collection/changes.js @
./node_modules/angularfire2/firestore/public_api.js @ ./node_modules/angularfire2/firestore/index.js @
./src/app/app.component.ts @ ./src/app/app.module.ts @ ./src/app/main.ts

package.json

{
"name": "stockup",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.4.4",
"@angular/compiler": "4.4.4",
"@angular/compiler-cli": "4.4.4",
"@angular/core": "4.4.4",
"@angular/forms": "4.4.4",
"@angular/http": "4.4.4",
"@angular/platform-browser": "4.4.4",
"@angular/platform-browser-dynamic": "4.4.4",
"@angular/tsc-wrapped": "4.4.4",
"@ionic-native/barcode-scanner": "4.3.0",
"@ionic-native/core": "3.14.0",
"@ionic-native/splash-screen": "3.12.1",
"@ionic-native/status-bar": "3.12.1",
"@ionic/storage": "2.0.1",
"@types/node": "8.0.19",
"angularfire2": "^5.0.0-rc.0",
"cordova-ios": "^4.4.0",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.2",
"cordova-plugin-whitelist": "^1.3.1",
"firebase": "^4.5.0",
"install": "^0.10.1",
"ionic-angular": "^3.7.1",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "^3.0.0",
"npm": "^5.4.2",
"phonegap-plugin-barcodescanner": "^6.0.8",
"promise-polyfill": "^6.0.2",
"rxjs": "5.4.3",
"sudo": "^1.0.3",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "^3.0.0",
"typescript": "^2.5.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"phonegap-plugin-barcodescanner": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {}
},
"platforms": [
"ios"
]
}
}

我一直在努力解决这个问题,希望有人能提供帮助。相关环境信息如下:

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.0.0
Cordova Platforms : ios 4.4.0
Ionic Framework : ionic-angular 3.7.1

System:

Node : v6.11.3
npm : 5.4.2
OS : OS X El Capitan
Xcode : Xcode 8.2.1 Build version 8C1002

如果我可以提供任何其他信息来帮助您,请告诉我。提前致谢。

最佳答案

错误:

./node_modules/firebase/firestore/platform_browser/webchannel_connection.js Module not found: Error: Can't resolve '@firebase/webchannel-wrapper' in

解决方案:

您需要安装@firebase/webchannel-wrapper模块。

npm install @firebase/webchannel-wrapper --save-exact

关于angular - 错误 : Can't resolve '@firebase/webchannel-wrapper' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46556054/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com