为了账号安全,请及时绑定邮箱和手机立即绑定

更新 npm 后,node_modules 出现错误?

更新 npm 后,node_modules 出现错误?

一只名叫tom的猫 2023-07-20 14:30:46
这是我更新 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部分)。

查看完整回答
反对 回复 2023-07-20
  • 1 回答
  • 0 关注
  • 81 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信