"export 'default' (imported as 'config') was not found in './config'
时间: 2023-09-25 08:15:11 浏览: 105
这个错误通常发生在使用模块导入时,导入的模块没有导出默认的函数或对象。在你的情况下,你尝试从 './config' 模块中导入一个名为 'config' 的默认函数或对象,但这个默认导出并不存在。
要解决这个问题,你可以检查一下你导入模块的路径是否正确,并且确保你导入的模块中有一个默认导出。默认导出通常使用关键字 'export default' 来实现。
如果你确定路径和模块的默认导出都是正确的,那可能是由于一些其他问题导致的。你可以尝试重新安装相关模块或查看文档以获得更多信息来解决该问题。
相关问题
WARN "css.modules" option in vue.config.js is deprecated now, please use "css.requireModuleExtension" instead. INFO Starting development server... 98% after emitting CopyPlugin WARNING Compiled with 17 warnings 09:43:57 warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'computed' was not found in 'vue' warning in ./src/router/index.js "export 'default' (imported as 'VueRouter') was not found in 'vue-router' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'defineComponent' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'getCurrentInstance' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'h' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'inject' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'nextTick' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'onActivated' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'onDeactivated' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'onUnmounted' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'provide' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'reactive' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'ref' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'shallowRef' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'unref' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'watch' was not found in 'vue' warning in ./node_modules/vue-router/dist/vue-router.mjs "export 'watchEffect' was not found in 'vue'这个报错因为什么
这个报错是因为在使用Vue Router时,导入的Vue Router版本与当前项目中的Vue版本不匹配导致的。具体来说,Vue Router中使用了Vue 3的语法而当前项目中使用的是Vue 2,所以会出现一些语法上的错误。解决方法是将Vue Router更新到与当前项目中使用的Vue版本相匹配的版本。
warning in ./node_modules/clipboard/src/clipboard.js "export 'default' (imported as 'ClipboardAction') was not found in './clipboard-action'
这个警告通常是由于导入的模块中没有导出 `default`。在这种情况下,您可以尝试使用以下语法导入模块:
```javascript
import * as ClipboardAction from './clipboard-action';
```
或者,您可以检查 `clipboard-action` 模块的代码,确保它导出了 `default`。您可以尝试在 `clipboard-action` 模块中添加以下代码:
```javascript
export default ClipboardAction;
```
这应该解决警告问题。
阅读全文