【发布时间】:2020-08-11 23:33:40
【问题描述】:
我正在尝试在我的 Angular 项目中安装 NPM 包 thirft。我添加到 mi package.json:
"@types/thrift": "^0.10.9",
"thrift": "^0.13.0",
"node-int64": "^0.4.0",
然后我运行npm Install 一切似乎都很顺利。
如 npm 包网页中所述,我必须对包发出咕噜声才能完成安装。 按照我得到包并执行的步骤: npm 安装 npx咕噜声
然后我得到这个错误
Running "shell:ThriftGen" (shell) task
>> /bin/sh: 1: ../../compiler/cpp/thrift: not found
Warning: Done, with errors: command "mkdir -p test/gen-js && ../../compiler/cpp/thrift -gen js --out test/gen-js ../../test/ThriftTest.thrift && ../../compiler/cpp/thrift -gen js --out test/gen-js ../../test/JsDeepConstructorTest.thrift && mkdir -p test/gen-js-jquery && ../../compiler/cpp/thrift -gen js:jquery --out test/gen-js-jquery ../../test/ThriftTest.thrift && mkdir -p test/gen-nodejs && ../../compiler/cpp/thrift -gen js:node --out test/gen-nodejs ../../test/ThriftTest.thrift && mkdir -p test/gen-js-es6 && ../../compiler/cpp/thrift -gen js:es6 --out test/gen-js-es6 ../../test/ThriftTest.thrift && mkdir -p test/gen-nodejs-es6 && ../../compiler/cpp/thrift -gen js:node,es6 --out ./test/gen-nodejs-es6 ../../test/ThriftTest.thrift" (target "ThriftGen") exited with code 127. Use --force to continue.
Aborted due to warnings.
看来,使用武力并不能纠正根本问题,而是忽略它并以错误的安装告终。
【问题讨论】:
标签: node.js npm gruntjs thrift