新建微信小程序是没有package.json
文件的,创建此文件npm命令如下:
npm init
若出现
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 init` 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键即可。
PS:若一直按Enter键没有回应的话,看看你的工程名,一定要英文,不能包含中文。
网友评论