私は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
私が直接(npm
とpackage.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 test
とnpm run start
)は問題ありません。これはフロー関連のようです。
https://github.com/flowtype/flow-bin/blob/669513d905fd67fad3035f8837f29b8d66128139/index.js –