Vue.js Can';t重新导出指定的导出';模块名称';node_modules/graphql/index.mjs=>;Vue CLI 3+;阿波罗

Vue.js Can';t重新导出指定的导出';模块名称';node_modules/graphql/index.mjs=>;Vue CLI 3+;阿波罗,vue.js,graphql,apollo,Vue.js,Graphql,Apollo,const apolloProvider=new vuepollo({defaultClient}) 当我将ApolloBoost集成到Vue CLI 3时,我遇到了一个问题。它表示“../node_modules/graphql/index.mjs中的”无法从非EcmaScript模块重新导出命名的导出'visitInParallel'(只有默认导出可用)错误” 以下是我尝试过的不同方法: 1.我尝试配置vue.config.js 2.使用node--实验模块../node_modules/g

const apolloProvider=new vuepollo({defaultClient})

当我将ApolloBoost集成到Vue CLI 3时,我遇到了一个问题。它表示“../node_modules/graphql/index.mjs中的”无法从非EcmaScript模块重新导出命名的导出'visitInParallel'(只有默认导出可用)错误”

以下是我尝试过的不同方法:
1.我尝试配置vue.config.js
2.使用node--实验模块../node_modules/graphql/index.mjs


难怪它不起作用。

我解决这个问题的方法是安装vue cli插件apollo

npm install vue-cli-plugin-apollo
or
yarn add vue-cli-plugin-apollo
vue cli可能需要vue cli插件apollo才能使用vue apollo

npm install vue-cli-plugin-apollo
or
yarn add vue-cli-plugin-apollo