代码先锋网 代码片段及技术文章聚合

vue动态加载的菜单报错Cannot find module xxxxxx 与the request of a dependency is an expression 解决方法

技术标签: vue  ui框架  Element-ui

element-admin 动态加载菜单报错:

Cannot find module '@/views/ShopConfig/ShopLis

并且控制台显示

Critical dependency: the request of a dependency is an expression

解决方法只有一个

那就是

将你之前的

 () => import(`@/views${url}`)  

将这个 


改成

resolve => require([`@/views${url}`], resolve)

即可解决

真的,代码不难,难就难到各种环境问题,不支持。我难啊

版权声明:本文为qq_31281245原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_31281245/article/details/106194780

智能推荐

解决RemoveError: "setuptools" is a dependency of conda and cannot be removed from conda

昨天将显卡驱动从389更新为418之后,无法创建新环境,且无法删除旧环境,使用conda remove或者conda create命令均会报错: RemoveError: ‘setuptools’ is a dependency of conda and cannot be removed from conda 查了一堆博客,都是建议更新conda。 输入命令conda u...

[已解决]RemoveError: ‘requests‘ is a dependency of conda and cannot be removed from

[已解决]RemoveError: ‘requests’ is a dependency of conda and cannot be removed from conda’s operating environment. 问题:使用conda update conda 报如上错误 解决: conda update --force conda...

conda创建环境报错 ‘setuptools‘ is a dependency of conda

This error is about you can not update setuptools in conda env, so you should update conda dependency as fllow 'conda update --update-deps conda' first. This worked for me.  “Verifying tran...

Cannot find module vue动态加载的菜单报错

研究一下午就这个结论...

The result of the xpath expression is: [object Attr]. It should be an element

yutube爬虫动态加载,需要用到selenium-webdriver,使用过程中,首先使用 find_elements_by_xpath进行批量标签的定位选取,之后 使用find_element_by_xpath精细筛选选标签的时候出现上面错误提示, 原因是这个webdriver的定位方法和浏览器xpath不一样,不能直接定位到标签的属性 需要首先定位到webelement,之后get到属性 例...

猜你喜欢

error C2275: ‘XXX’ : illegal use of this type as an expression 报错的解决方法!

当你命名你的源文件时*.c,MSVC假定它正在编译C,这意味着C89。所有块本地变量都需要在块的开头声明。 解决方法包括: 在代码块的开始部分声明/初始化所有局部变量(紧接在大括号之后{) 将源文件重命名为*.cpp或等效并编译为C ++。 升级到VS 2013,放宽这个限制。   示例: 下面程序会报错 代码没问题 怀疑是纯C环境 比较老的版本 所以要求变量定义只能在开头 这样编译器就...

You cannot use the alias ‘r‘ of an expression containing a window function in this context.‘

报错:You cannot use the alias 'r' of an expression containing a window function in this context.' 换成where则报:Unknown column 'r' in 'where clause' 可以改成: 参考资料: MySQL rank() over、dense_rank() over、row_numbe...

Cannot find module 'esm' 解决方法

通过node app.js启动web项目的时候遇到cannot find module 'esm’报错,完整报错如下: 解决方法: 先将npm升级至最新版本。(但不确定是否有用) 通过查找npm里的esm文档发现,可以单独安装esm module: 本机为MacOS系统,故使用 安装 以上操作都是在想要运行的项目的根目录里进行的 3. 安装完成后,通过 启动项目,成功。...

Cannot find module ‘HtmlWebpackPlugin‘解决方法

出错的地方: 正确的方式:...