2017-07-08 10 views
0

私はこのプロジェクトを長年取り組んできました。これを何度も展開しました。 しかし、私は月かそこら後にこのプロジェクトを開いて、私は--only機能Firebaseの機能Deploy Error

に展開firebase
i deploying functions 
i functions: ensuring necessary APIs are enabled... 
i runtimeconfig: ensuring necessary APIs are enabled... 
✔ runtimeconfig: all necessary APIs are enabled 
✔ functions: all necessary APIs are enabled 
i functions: preparing functions directory for uploading... 

Error: Error occurred while parsing your function triggers. 

Error: The module '/private/var/folders/n3/h9nbc_ys2732s35_9jlgh98c0000gn/T/fbfn_6601274o3l5DKN66/node_modules/grpc/src/node/extension_binary/grpc_node.node' 
was compiled against a different Node.js version using 
NODE_MODULE_VERSION 51. This version of Node.js requires 
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing 
the module (for instance, using `npm rebuild` or `npm install`). 
    at Object.Module._extensions..node (module.js:598:18) 
    at Module.load (module.js:503:32) 
    at tryModuleLoad (module.js:466:12) 
    at Function.Module._load (module.js:458:3) 
    at Module.require (module.js:513:17) 
    at require (internal/module.js:11:18) 
    at Object.<anonymous> (/private/var/folders/n3/h9nbc_ys2732s35_9jlgh98c0000gn/T/fbfn_6601274o3l5DKN66/node_modules/grpc/src/node/src/grpc_extension.js:38:15) 
    at Module._compile (module.js:569:30) 
    at Object.Module._extensions..js (module.js:580:10) 
    at Module.load (module.js:503:32) 

ジェネリック情報を打った後、次のエラーを取得しています:

NPM -v 5.1.0を私もエラーがビットdiffeに見える、LTSリリース6.11.0でこれを試してみました-v v8.1.3

ノード家賃はまだ同じです。

i deploying database, functions, hosting 
✔ database: rules ready to deploy. 
i functions: ensuring necessary APIs are enabled... 
i runtimeconfig: ensuring necessary APIs are enabled... 
✔ runtimeconfig: all necessary APIs are enabled 
✔ functions: all necessary APIs are enabled 
i functions: preparing functions directory for uploading... 

Error: Error occurred while parsing your function triggers. 

Error: Module version mismatch. Expected 48, got 51. 
    at Error (native) 
    at Object.Module._extensions..node (module.js:597:18) 
    at Module.load (module.js:487:32) 
    at tryModuleLoad (module.js:446:12) 
    at Function.Module._load (module.js:438:3) 
    at Module.require (module.js:497:17) 
    at require (internal/module.js:20:19) 
    at Object.<anonymous> (/private/var/folders/n3/h9nbc_ys2732s35_9jlgh98c0000gn/T/fbfn_615356S6aA0PtZuOQ/node_modules/grpc/src/node/src/grpc_extension.js:38:15) 
    at Module._compile (module.js:570:32) 
    at Object.Module._extensions..js (module.js:579:10) 

/private/var/folders/n3/h9nbc_ys2732s35_9jlgh98c0000gn/T/fbfn_6601274o3l5DKN66/node_modules/grpc/ 

にCDしようとして、やはり同じエラーを

npm install --build-from-source 

を実行します。

重要な再構築手順がありますか?

+0

特に、モジュールgrpcについて不平を言っています。あなたはそれを更新しようとしましたか? grpcにはネイティブコンポーネント(コンパイル済みのc、純粋なjではなく)があります。エラーメッセージを書き留めて、 'npm rebuild'と' npm install'を試しましたか? –

+0

@DougStevenson私はdirにcdして再構築しようとしました。私はそれが正しい方法ではないと推測しています。 グローバルパッケージの依存関係をどのように再構築できますか? –

+0

'npm install'と同じディレクトリから常にnpmを使います - あなたのpackage.jsonはどこにあるのですか –

答えて

1

解決しました。 firebase-toolsパッケージには現在、ノードV 7.10.0が必要です。 nvm経由でインストールしました。

これは単なる一時的な修正です。グローバルパッケージの依存関係を再構築する方法を知っている人は、投稿してください。ダグによって示唆されるように

+0

この[その他のスタックポスト](https://stackoverflow.com/questions/41214381/how-to-upgrade-a-dependency-of-a-global-package-in- npm)はあなたの答えを完成させるのに役立つかもしれません。 – Jordan

0

、私が再建しましgrpc:

npm rebuild grpc --update-binary 

...とエラーが消えました。あなたはそれを試してみるべきです。

関連する問題