【问题标题】:Why is grpc using the wrong version?为什么grpc使用了错误的版本?
【发布时间】:2023-03-08 02:56:01
【问题描述】:

当我尝试进行离子发球时,收到以下消息:

$ npm run ionic:serve

QuickNurseApp@1.0.5 ionic:serve /Users/debbiefigg/Projects/QuickNurse/quick-nurse-app
node ./bin/pp envs generate local ; node_modules/.bin/ionic-app-scripts serve

Generating environment configuration for target local
Copying src/environments/environment.local.ts to src/environments/environment.ts
Done!
/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/node-sass/lib/binding.js:13
      throw new Error(errors.unsupportedEnvironment());
      ^

Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (64)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.7.2
    at module.exports (/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@ionic/app-scripts/dist/core/bundle-components.js:6:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! QuickNurseApp@1.0.5 ionic:serve: `node ./bin/pp envs generate local ; node_modules/.bin/ionic-app-scripts serve`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the QuickNurseApp@1.0.5 ionic:serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/debbiefigg/.npm/_logs/2018-09-04T10_07_09_563Z-debug.log

所以我用以下结果更新了 node-sass:

$ npm i -g node-sass@latest

/usr/local/bin/node-sass -> /usr/local/lib/node_modules/node-sass/bin/node-sass

node-sass@4.9.3 install /usr/local/lib/node_modules/node-sass
node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/darwin-x64-64_binding.node
Download complete ░⸩ ⠋ :
Binary saved to /usr/local/lib/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Caching binary to /Users/debbiefigg/.npm/node-sass/4.9.3/darwin-x64-64_binding.node

node-sass@4.9.3 postinstall /usr/local/lib/node_modules/node-sass
node scripts/build.js

Binary found at /usr/local/lib/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
+ node-sass@4.9.3
added 175 packages from 134 contributors in 9.822s

然后我尝试删除 iOS 平台,以便重新安装它,但我收到了这么多错误消息。我不知道从哪里开始解读它们的含义。我知道我有 grpc v1.14.1,所以我不知道它从哪里获得 v1.10.1。

顺便说一句,在尝试了许多不同的解决方案之前和之后,我收到了一组类似的消息,我求助于卸载 Homebrew 及其所有软件包和各种其他软件包,这样我就可以从一个干净的系统开始。然后用 Homebrew 重新安装了所有东西,所以我知道它们被整齐地安装在 Homebrew 的控制下,但事实证明什么都没有改变,因为我再次收到相同的消息。

这就是我寻求帮助的原因,因为我已经没有想法了。

$ ionic cordova platforms rm ios

cordova platform remove ios --save
Removing platform ios from config.xml file...
Removing ios from cordova.platforms array in package.json
(node:12448) UnhandledPromiseRejectionWarning: CordovaError: Error: npm: Command failed with exit code 1 Error output:
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-darwin-x64-unknown.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.10.1 and node@10.9.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Pre-built binaries not installable for grpc@1.10.1 and node@10.9.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file 
rm: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok 
make: *** No rule to make target `Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o', needed by `Release/libgrpc.a'.  Stop.
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/debbiefigg/Projects/QuickNurse/quick-nurse-app/node_modules/@firebase/firestore/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc@1.10.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/debbiefigg/.npm/_logs/2018-09-04T10_10_06_935Z-debug.log
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/index.js:302:29
    at _rejected (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:864:24)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:890:30
    at Promise.when (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:1142:31)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:808:41)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:624:44
    at runSingle (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:137:13)
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
(node:12448) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12448) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

【问题讨论】:

    标签: node.js ionic-framework npm grpc


    【解决方案1】:

    好的,因为我的答案被删除了,因为它与我的另一个帖子重复,这是我另一个帖子的链接,所以如果你先看到这个帖子,你可以看到答案:

    Pre-built binaries not found for grpc1-10-1 and node10-9-0

    当我提交每个帖子时,我没有意识到它们最终会出现大致相同的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-18
      • 2013-01-13
      • 2021-08-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-07
      相关资源
      最近更新 更多