NPM软件包的安装失败,出现无关的软件包错误

时间:2018-10-22 10:04:47

标签: node.js postgresql typescript npm package-managers

我在节点应用上执行以下命令:

npm install --save-dev typescript

我得到这个错误:

> libpq@1.8.8 install /Users/prmph/Dropbox/Repositories/Alt/node_modules/libpq
> node-gyp rebuild

/bin/sh: pg_config: command not found
gyp: Call to 'pg_config --libdir' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1

打字稿与pg_config有什么关系?

我的package.json中确实有一些与Postgres相关的软件包,但是为什么要安装特定的软件包与已经安装的软件包有什么关系

1 个答案:

答案 0 :(得分:0)

在安装新软件包时,npm还将安装package.json中缺少的软件包

在安装新软件包之前,请尝试从干净的状态开始。

相关问题