• 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

  • 相关阅读:
    mysql中delimiter
    error: unpacking of archive failed on file /usr/sbin/zabbix_agent;592e5bc3: cpio: open
    CefSharp中文帮助文档
    ASP.NET Aries 开发框架
    简洁的富文本编辑器
    asp.net core 获取appsettings.json里的配置
    在asp.net core中使用NLog
    临时禁用Resharper
    visual studio 无添加视图 选项
    visual studio(vs)初始化
  • 原文地址:https://www.cnblogs.com/tig666666/p/6526840.html
Copyright © 2020-2023  润新知