zoukankan      html  css  js  c++  java
  • NodeJS

    最近在研究node.js,在安装npm的时候发现了几个报错,瞬间蒙圈,查找文献基本解决(文献好少呀~  -。-)
     
    一、报错:“can not open  path/path/package.json”
     
    原因:在安装npm的时候,终端会调取一个叫package.json的文件,里边包含了 name,version,dependencies 等等属性信息,当终端找不到该文件的时候也就不能完成安装操作。
     
    解决方法:在对应的path下边创建该文件,并且把需要的模块写在dependencies属性里,比如
    "dependencies": { "express": "4.15.2"}
    。然后使用npm install创建就好了。
     
     
    二、 No repository field  这个问题如下解答,不想翻译了,筒子们可以自己看~~~(有时间也许会回头翻一下   =、=)
     

    In this post we are going to discuss about npm warning message "npm WARN package.json No repository field". This warning comes up when you are trying to install any npm packages. This is just a warning so actually you do not have to worry about it.

    This warning means that the package does not have the repository field in the package.json. This field is used just for informational purposes. Suppose you are an author of a package and you are getting this error, you can write the below code in your package.json to remove this warning.

    "repository": {

        "type" : "git",

        "url" : "Your_Package_URL"

    }

    According to NPM , repository means the place where your code lives. This is helpful for people who wants to contribute. If the git repository is on GitHub, then the npm docs command will be able to find you.

         

    You can also check the issues already logged  https://github.com/npm/npm/issues/3568

    . Please Like and Share the Blog, if you find it interesting and helpful.

     

     原文点这里    PC_package.json

  • 相关阅读:
    linux 修改运行级别(默认命令行启动)
    数据库循环
    html——黑体、斜体、下划线及删除线
    SQL利用Case When Then Else End多条件判断
    数据库私房菜——(扯淡的三种主流数据库 oracle、sqlserver、mysql)
    Ubuntu linux 各种技术支持(逐步完善中)
    win7(win8)系统下安装SQL2005(SQL Server 2005)图文教程
    linux 配置固定IP
    oracle 技术支持
    简单上手的游戏引擎
  • 原文地址:https://www.cnblogs.com/tig666666/p/6526840.html
Copyright © 2011-2022 走看看