这是我更新 npm 后遇到的错误,由于出现 [WDS] Disconnected 错误!Mozilla Firefox 控制台中出现错误。这是有经验的开发人员需要解决的错误。5 import firebase from 'firebase/app'; ~~~~~~~~ node_modules/firebase/index.d.ts:9710:1 9710 export = firebase; ~~~~~~~~~~~~~~~~~~ This module is declared with using 'export =', and can only be used with a default import when using the'allowSyntheticDefaultImports' flag.node_modules/@angular/fire/firestore/collection-group/collection-group.d.ts:2:8 - error TS1259: Module '"D:/apps/angularfs3/node_modules/firebase/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag2 import firebase from 'firebase/app'; ~~~~~~~~ node_modules/firebase/index.d.ts:9710:1 9710 export = firebase; ~~~~~~~~~~~~~~~~~~ This module is declared with using 'export =', and can only be used with a default import when using the'allowSyntheticDefaultImports' flag.node_modules/@angular/fire/firestore/firestore.d.ts:9:8 - error TS1259: Module '"D:/apps/angularfs3/node_modules/firebase/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag9 import firebase from 'firebase/app'; ~~~~~~~~ node_modules/firebase/index.d.ts:9710:1 9710 export = firebase; ~~~~~~~~~~~~~~~~~~ This module is declared with using 'export =', and can only be used with a default import when using the'allowSyntheticDefaultImports' flag.node_modules/@angular/fire/auth/auth.d.ts:4:8 - error TS1259: Module '"D:/apps/angularfs3/node_modules/firebase/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag4 import firebase from 'firebase/app'; ~~~~~~~~
1 回答
HUWWW
TA贡献1874条经验 获得超12个赞
您需要添加"allowSyntheticDefaultImports": true
您的tsconfig.json
(compilerOptions
部分)。
添加回答
举报
0/150
提交
取消