简体   繁体   English

我执行npm安装时未显示package.json grunt依赖模块

[英]package.json grunt dependences modules don't show up when i do a npm install

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. 我创建了一个带有grunt依赖项的package.json文件,我进行了npm安装,但是grunt模块没有出现在我的网站层次结构中,我得到的只是一堆关于终端中我不需要的插件的警告。 Also I am defiantly pointing to the right folder but it says they folder don't exist 我也挑衅地指向正确的文件夹,但它说它们不存在

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$

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 1.运行npm init以创建包含所需信息的有效package.json文件
2. Install and save your npm modules in your package.json file with --save argument. 2.使用--save参数将npm模块安装并保存在package.json文件中。 ( Eg : npm install grunt-contrib-cssmin --save ) 例如npm install grunt-contrib-cssmin --save

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM