当我进行npm安装时,package.json grunt依赖模块不显示

时间:2021-03-18 07:23:34

I have created a package.json file with grunt dependencies I do my npm install but the grunt modules do not show up in my website hierarchy all I get is a bunch of warn in the terminal about different plugins that I didn't want. Also I am defiantly pointing to the right folder but it says they folder don't exist

我创建了一个带有grunt依赖项的package.json文件我做我的npm安装但是grunt模块没有显示在我的网站层次结构中我得到的是一堆警告终端关于我不想要的不同插件。此外,我挑衅地指向正确的文件夹,但它说他们的文件夹不存在

MacBook-Pro:Taylerramsay Tayler_Ramsay$ cd ~/Desktop/taylerramsay 
MacBook-Pro:taylerramsay Tayler_Ramsay$ npm install 
npm WARN enoent ENOENT: no such file or directory, open '/Users/Tayler_Ramsay/package.json' 
npm WARN Tayler_Ramsay No description
npm WARN Tayler_Ramsay No repository field. 
npm WARN Tayler_Ramsay No README data 
npm WARN Tayler_Ramsay No license field. 
MacBook-Pro:taylerramsay Tayler_Ramsay$

1 个解决方案

#1


0  

npm tells you that there is no package.json file in your directory then it can install anything.

npm告诉你目录中没有package.json文件然后它可以安装任何东西。

I recommend you to follow these step :
1. run npm init to create a valid package.json file with needed information
2. Install and save your npm modules in your package.json file with --save argument. (E.g : npm install grunt-contrib-cssmin --save)

我建议您按照以下步骤操作:1。运行npm init以创建包含所需信息的有效package.json文件2.使用--save参数在package.json文件中安装并保存npm模块。 (例如:npm install grunt-contrib-cssmin --save)

#1


0  

npm tells you that there is no package.json file in your directory then it can install anything.

npm告诉你目录中没有package.json文件然后它可以安装任何东西。

I recommend you to follow these step :
1. run npm init to create a valid package.json file with needed information
2. Install and save your npm modules in your package.json file with --save argument. (E.g : npm install grunt-contrib-cssmin --save)

我建议您按照以下步骤操作:1。运行npm init以创建包含所需信息的有效package.json文件2.使用--save参数在package.json文件中安装并保存npm模块。 (例如:npm install grunt-contrib-cssmin --save)