npm启动错误npm-debug.log文件丢失

时间:2015-08-13 16:41:22

标签: node.js npm

我正在尝试使用 git bash 执行npm start,但我收到此消息:

Error -4058", "ENOENT package .json

Please include the following file C:\..\npm-debug.log

我尝试过这些没有奏效的事情:

  • 清除npm缓存
  • 更新到最新的npm

有没有人遇到过这个问题?

3 个答案:

答案 0 :(得分:1)

您还没有创建package.json文件。您需要创建它,然后将脚本“start”添加到它。

package.json的例子: -

{
    name: "<Your package name>"
    "scripts": {
         "start": "<You start command>"
    }
}

答案 1 :(得分:0)

我在package.json中添加了这个:

`

"scripts": {
    "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",    
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "typings": "typings",
    "postinstall": "typings install" 
  }

`

正如#Golak_Sarangi所说的那样。谢谢老兄,这对我有用。

答案 2 :(得分:-1)

下载此文件

Fortinet_CA_SSLProxy.crt

并保存在某个文件夹中。在终端:

sudo cp Fortinet_CA_SSLProxy.crt /usr/share/ca-certificates

然后尝试:

sudo dpkg-reconfigure ca-certificates

在终端选择enter中出现一个新对话框并选择Fortinet_CA_SSLProxy.crt选项并单击确定。

注意:使用空格键选择选项。