2016-09-04 12 views
2

私はUbuntu 14.04を使用しています。ノードのバージョンは4.5.0です。 npmバージョンは2.15.9です。`npm run flow`実行時にプラットフォームがサポートされない

私は私のpackage.json開発の依存関係にflow-binバージョン0.32.0を持っている:

$ npm ls --depth 0 | grep flow 
[email protected] /home/mperdikeas/test-project 
├── [email protected] 
├── [email protected] 

マイnpm run flowターゲットは次のとおりです:

cat package.json | grep \"flow\" 
"flow": "flow; test $? -eq 0 -o $? -eq 2", 
$ cat package.json | grep flow-bin 
"flow-bin": "^0.32.0", 

flow-binパッケージがローカルで利用可能です私はnpm run flowを実行すると、私は次のトレースを取得する:

$ npm run flow 

> [email protected] flow /home/mperdikeas/test-project 
> flow; test $? -eq 0 -o $? -eq 2 

/home/mperdikeas/test-project/node_modules/flow-bin/cli.js:20 
    throw new Error('Platform not supported.'); 
    ^

Error: Platform not supported. 
    at Object.<anonymous> (/home/mperdikeas/test-project/node_modules/flow-bin/cli.js:20:9) 
    at Module._compile (module.js:409:26) 
    at Object.Module._extensions..js (module.js:416:10) 
    at Module.load (module.js:343:32) 
    at Function.Module._load (module.js:300:12) 
    at Function.Module.runMain (module.js:441:10) 
    at startup (node.js:139:18) 
    at node.js:974:3 

npm ERR! Linux 3.13.0-62-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "flow" 
npm ERR! node v4.5.0 
npm ERR! npm v2.15.9 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] flow: `flow; test $? -eq 0 -o $? -eq 2` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] flow script 'flow; test $? -eq 0 -o $? -eq 2'. 
npm ERR! This is most likely a problem with the serverside-node-babel-mocha-flow package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  flow; test $? -eq 0 -o $? -eq 2 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs serverside-node-babel-mocha-flow 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! 
npm ERR!  npm owner ls serverside-node-babel-mocha-flow 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/mperdikeas/test-project/npm-debug.log 

私が直接(npmpackage.jsonを使用せずに)シェルからの流れを実行すると私は同じトレースを取得:

$ ./node_modules/flow-bin/vendor/flow 
/home/mperdikeas/test-project/node_modules/flow-bin/cli.js:20 
    throw new Error('Platform not supported.'); 
    ^

Error: Platform not supported. 
at Object.<anonymous> (/home/mperdikeas/test-project/node_modules/flow-bin/cli.js:20:9) 
at Module._compile (module.js:409:26) 
at Object.Module._extensions..js (module.js:416:10) 
at Module.load (module.js:343:32) 
at Function.Module._load (module.js:300:12) 
at Module.require (module.js:353:17) 
at require (internal/module.js:12:17) 
at Object.<anonymous> (/home/mperdikeas/test-project/node_modules/flow-bin/vendor/flow:16:1) 
at Module._compile (module.js:409:26) 
at Object.Module._extensions..js (module.js:416:10) 

意味は何ですかつまり、サポートされていないプラットフォームは何ですか?私はそれをどうやって修正することができますか?

私の他のターゲット(例:npm run testnpm run start)は問題ありません。これはフロー関連のようです。

+0

https://github.com/flowtype/flow-bin/blob/669513d905fd67fad3035f8837f29b8d66128139/index.js –

答えて

3

フローには64ビットのオペレーティングシステムが必要です。 Ubuntuの32ビットバージョンを実行している可能性はありますか?

https://github.com/facebook/flow/issues/270には、Flowが現在64ビットを必要とする理由に関するコンテキストがあります。

+0

はい、それは32ビットのUbuntu 14.04システムでした。同じ設定が、64ビットUbuntu 14.04システムで問題なく動作しました。 –

関連する問題