无法加载 PSReadline 模块。控制台在未使用 PSReadline 的情况下运行。

文章描述:

Windows10 Hbuilder X运行Vue项目提示:无法加载 PSReadline 模块。控制台在未使用 PSReadline 的情况下运行。

错误

 

解决方法

1、在管理员权限下运行Windows Power Shell(x64)

2、 然后输入Set-ExecutionPolicy Unrestricted

3、选择Y

4、最后输入Import-Module ‘C:\Program Files\WindowsPowerShell\Modules\PSReadline\1.2\PSReadline.psd1’

ERROR ReferenceError: path is not defined

这个错误是缺少path引入,要在vue.config.js中引入path

const path = require('path')

 

发布时间:2022/07/13

发表评论