uni-app [plugin:uni:app-nvue-esbuild] ENOENT 错误:no such file or directory

uni-app [plugin:uni:app-nvue-esbuild] ENOENT 错误:no such file or directory

[plugin:uni:app-nvue-esbuild] ENOENT: no such file or directory, lstat ‘D:\Works\xxxx\unpackage\dist\dev.nvue\app-config.js’

如题所属问题,这个只有我有这个问题么,查遍全网都没有人提?

开启"renderer":“native”, 这个配置,就有, 去掉就正常了。

是什么原因?

alt text


更多关于uni-app [plugin:uni:app-nvue-esbuild] ENOENT 错误:no such file or directory的实战教程也可以访问 https://www.itying.com/category-93-b0.html

10 回复

已记录问题后续优化,已加分感谢反馈!

更多关于uni-app [plugin:uni:app-nvue-esbuild] ENOENT 错误:no such file or directory的实战教程也可以访问 https://www.itying.com/category-93-b0.html


勾选纯nvue项目就会报这个错,确实无法使用。 环境vue3,nvue页面编译模式uni-app。

解决的怎么样了?有进度了吗?

我也遇到了

勾选纯nvue项目就会报这个错,确实无法使用。 环境vue3,nvue页面编译模式uni-app。

这个是不是还没有解决!

还是没有解决

还是没有解决

没有解决,而且我还发现了一个bug:有nvue组件,不勾选纯nvue,也会报错

在 uni-app 开发过程中,遇到 [plugin:uni:app-nvue-esbuild] ENOENT 错误:no such file or directory 通常是由于文件路径问题或构建工具无法找到指定文件导致的。以下是一些可能的解决方案:

1. 检查文件路径

  • 确保项目中所有引用的文件路径都是正确的,尤其是 nvue 文件。
  • 检查 pages.json 中配置的页面路径是否正确。

2. 清理缓存并重新构建

  • 删除 node_modules 目录和 package-lock.json 文件。
  • 运行 npm installyarn install 重新安装依赖。
  • 运行 npm run devyarn dev 重新构建项目。

3. 检查 nvue 文件是否存在

  • 确保项目中所有 nvue 文件都存在,并且文件名和路径没有拼写错误。

4. 更新依赖

  • 确保 uni-app 和相关依赖是最新版本。可以运行以下命令更新:
    npm update
    
  • 或者手动更新 @dcloudio/uni-app@dcloudio/vue-cli-plugin-uni
    npm install @dcloudio/uni-app@latest @dcloudio/vue-cli-plugin-uni@latest
    

5. 检查 esbuild 配置

  • 如果项目中使用了自定义的 esbuild 配置,检查配置是否正确,尤其是文件路径和插件配置。

6. 重新初始化项目

  • 如果以上方法都无法解决问题,可以尝试重新初始化项目:
    vue create -p dcloudio/uni-preset-vue my-project
    
  • 然后将原有代码迁移到新项目中。

7. 查看详细日志

  • 运行构建命令时,添加 --verbose 参数查看详细日志,可能会提供更多线索:
    npm run dev --verbose
回到顶部