我按照truffle网站上的说明进行unbox reacthttps://github.com/truffle-box/react-box
但是,当我输入'npm run start'时,我收到错误
npm ERR! path D:\COMP495\testReact\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'D:\COMP495\testReact\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\l_zha\AppData\Roaming\npm-cache\_logs\2018-11-21T12_45_14_733Z-debug.log
我可能会注意到,无论出于何种原因,我的根目录中都没有'package.json'文件 . 我的客户端文件夹中有一个'package.json'文件,所以我可以运行React,但不成功 .
1 回答
弄清楚了 . 我需要从Client目录运行它 . 从那里,在/ Client / src /我需要从/目录中添加来自/ build / contracts /,NOT / contracts /的 Contract 文件夹,因为那里没有json文件 .