9***@qq.com
9***@qq.com
  • 发布:2019-01-30 16:03
  • 更新:2019-05-16 13:32
  • 阅读:4717

uni-app新建官方默认模板,app真机运行报错

分类:uni-app

HBuilderX版本号 1.5.4.20190127
新建项目uni-app,第一个模板,然后在app真机运行,就报错了。
下面是打印的错误信息,看了官方的视频操作的。

15:58:31.717 项目 'test1' 开始编译...
15:58:36.820 { Error: ENOENT: no such file or directory, open 'C:\Users\Administrator\Documents\HBuilderProjects\test1\unpackage\dist\dev.tmp\app-plus\app.json'
15:58:36.820 at Object.fs.openSync (fs.js:646:18)
15:58:36.820 at Object.fs.readFileSync (fs.js:551:33)
15:58:36.835 at parseConfig (D:\HBuilderX\plugins\weapp-tools\lib\index.js:1:4187)
15:58:36.851 at index (D:\HBuilderX\plugins\weapp-tools\lib\index.js:1:12490)
15:58:36.867 at Promise (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-app-plus-plugin\index.js:17:11)
15:58:36.867 at new Promise (<anonymous>)
15:58:36.882 at compiler.hooks.done.tapPromise.compilation (D:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-app-plus-plugin\index.js:12:14)
15:58:36.898 at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:26:17)
15:58:36.898 at AsyncSeriesHook.lazyCompileHook (D:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\Hook.js:154:20)
15:58:36.913 at Watching._done (D:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:97:28)
15:58:36.913 at compiler.emitRecords.err (D:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:72:19)
15:58:36.929 at Compiler.emitRecords (D:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Compiler.js:371:39)
15:58:36.929 at compiler.emitAssets.err (D:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Watching.js:53:20)
15:58:36.929 at hooks.afterEmit.callAsync.err (D:\HBuilderX\plugins\uniapp-cli\node_modules\webpack\lib\Compiler.js:357:14)
15:58:36.945 at _err0 (eval at create (D:\HBuilderX\plugins\uniapp-cli\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:20:1)
15:58:36.945 at callback (D:\HBuilderX\plugins\uniapp-cli\node_modules\copy-webpack-plugin\dist\index.js:126:17)
15:58:36.960 errno: -4058,
15:58:36.960 code: 'ENOENT',
15:58:36.976 syscall: 'open',
15:58:36.976 path: 'C:\Users\Administrator\Documents\HBuilderProjects\test1\unpackage\dist\dev\.tmp\app-plus\app.json' }
15:58:36.976 [ERROR] 读取app.json失败...
15:58:36.991 ENOENT: no such file or directory, copyfile 'C:\Users\Administrator\Documents\HBuilderProjects\test1\unpackage\dist\dev.tmp\app-plus\manifest.json' -> 'C:\Users\Administrator\Documents\HBuilderProjects\test1\unpackage\dist\dev\app-plus\manifest.json'

2019-01-30 16:03 负责人:无 分享
已邀请:
DCloud_heavensoft

DCloud_heavensoft

你新建项目后没有改动manifest吗?重新再建一个试试?

9***@qq.com

9***@qq.com (作者)

找到问题了,默认新建项目会有中文路径,去掉中文路径就可以运行了

BJ_Q

BJ_Q - 少点套路,多点理性

我的项目也报这错误,但能正常运行,就是制作移动升级资源包的时候,一直报这个错误,求解

  • BJ_Q

    找到问题了,最好真机运行一下,看一下输出日志 ,可能会有报错显示

    2019-05-16 13:48

该问题目前已经被锁定, 无法添加新回复