从package-lock.json创建package.json [英] Create package.json from package-lock.json
本文介绍了从package-lock.json创建package.json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我下载了一个主题,它有一个package-lock.json文件,但没有package.json文件. 有没有一种方法可以从package-lock.json文件生成package.json. 如何仅使用package-lock.json文件安装节点模块. 有办法吗?
I downloaded a theme and it has a package-lock.json file but no package.json file. Is there a way I can generate the package.json from the package-lock.json file. How do I install the node modules with just the package-lock.json file. Is there a way to do that?
推荐答案
使用npm install -g npm
运行npm init
并回答问题.
上面的命令将生成一个package.json
,并包括package-lock.json
The above command will generate a package.json
and include the existing packages listed in package-lock.json
这篇关于从package-lock.json创建package.json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文