由于uni-app没有自动初始化npm,因此需要手动初始化npm包管理器
在终端中输入以下命令:
npm init
就会在目录下自动生成pakage.json文件
如果出现以下情况:
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
并且enter键死循环,则需要检查目录中是否存在中文名,如果存在,则修改成英文,问题解决