这两天在用springboot+vue进行一个系统整合时,后台程序没问题,前端用HBuilder-X导入工程功成后,执行运行--运行到终端--npm run serve时报错“package路径没有导出”,具体地是vuex这个包的问题。

经过多次查找,发现可以在该工程的根目录下(含有package.json文件)运行npm update,如果还是不行就执行npm audit fix --force来解决版本混乱问题。

Run the npm update command to solve the "Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No 'exports'" and then run npm audit fix --force if necessary.

The npm update command will update the installed modules that have fuzzy versioning.

Open your terminal in your project's root directory (where your package.json file is) and run the following commands.

Logo

前往低代码交流专区

更多推荐