【发布时间】:2022-01-11 15:56:29
【问题描述】:
我收到错误消息,由于 graphql-js 的依赖性,无法编译 graphql。
Version: webpack 4.43.0
Time: 69237ms
Built at: 01/12/2021 3:01:04 PM
35 assets
Entrypoint main = assets/vendors~896.bundle.js assets/page.js
ERROR in ./node_modules/graphql/index.mjs 12:0-65:205
Can't reexport the named export 'BREAK' from non EcmaScript module (only default export is available)
@ ./node_modules/graphql-tag/lib/index.js
@ ./node_modules/apollo-boost/lib/bundle.esm.js
@ ./src/apollo/client.ts
@ ./src/App.tsx
@ ./src/client.js
ERROR in ./node_modules/graphql/index.mjs 20:0-87:42
Can't reexport the named export 'SAMPLE' from non EcmaScript module (only default export is available)
@ ./node_modules/graphql-tag/lib/index.js
@ ./node_modules/apollo-boost/lib/bundle.esm.js
@ ./src/apollo/client.ts
@ ./src/App.tsx
@ ./src/client.js
ERROR in ./node_modules/graphql/index.mjs 99:0-80:50
Can't reexport the named export 'SAMPLE' from non EcmaScript module (only default export is available)
@ ./node_modules/graphql-tag/lib/index.js
@ ./src/apollo/client.ts
@ ./src/App.tsx
@ ./src/client.js
错误:无法从非 EcmaScript 模块重新导出命名导出“BREAK”(只有默认导出可用)
还有一百万以上。
附言。如果您需要更多详细信息,请告诉我
【问题讨论】:
-
你是如何在client.js中导入的?
-
@Andrei,只使用导入
标签: webpack graphql apollo apollo-client