Почему grpc использует неправильную версию? - PullRequest
0 голосов
/ 04 сентября 2018

Когда я попытался сделать ионную подачу, я получил следующие сообщения:

$ 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.

1 Ответ

0 голосов
/ 06 сентября 2018

ОК, так как мой ответ был удален, поскольку он был дубликатом другого моего поста, вот ссылка на другой мой пост, так что вы можете увидеть ответ, если вы впервые столкнулись с этим постом:

Предварительно собранные двоичные файлы не найдены для grpc1-10-1 и node10-9-0

Когда я отправлял каждое сообщение, я не осознавал, что в конечном итоге это будет примерно такая же проблема.

...