为什么grpc使用了错误的版本?

问题描述 投票:1回答:1

当我尝试做离子服务时,我收到以下消息:

$ npm run ionic:serve

[email protected] 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! [email protected] 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 [email protected] 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

[email protected] 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

[email protected] 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
+ [email protected]
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 [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (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! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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个回答
0
投票

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

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

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

© www.soinside.com 2019 - 2024. All rights reserved.