运行ning `npm 运行 flow` 时不支持平台
Platform not supported when running `npm run flow`
我在 Ubuntu 14.04。节点版本为 4.5.0
。 npm
版本为 2.15.9
.
我的 package.json
开发依赖项中有 flow-bin
版本 0.32.0
:
$ cat package.json | grep flow-bin
"flow-bin": "^0.32.0",
flow-bin
包在本地可用:
$ npm ls --depth 0 | grep flow
serverside-node-babel-mocha-flow@1.0.0 /home/mperdikeas/test-project
├── babel-plugin-transform-flow-strip-types@6.14.0
├── flow-bin@0.32.0
我的npm run flow
目标是:
cat package.json | grep \"flow\"
"flow": "flow; test $? -eq 0 -o $? -eq 2",
当我 运行 npm run flow
我得到以下跟踪:
$ npm run flow
> serverside-node-babel-mocha-flow@1.0.0 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! serverside-node-babel-mocha-flow@1.0.0 flow: `flow; test $? -eq 0 -o $? -eq 2`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serverside-node-babel-mocha-flow@1.0.0 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
当我直接从 shell 流出 运行 时(不使用 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
)工作正常。看来这跟Flow有关
Flow 需要 64 位操作系统。你有没有可能 运行 是 Ubuntu 的 32 位版本?
https://github.com/facebook/flow/issues/270 了解 Flow 当前需要 64 位的原因。
我在 Ubuntu 14.04。节点版本为 4.5.0
。 npm
版本为 2.15.9
.
我的 package.json
开发依赖项中有 flow-bin
版本 0.32.0
:
$ cat package.json | grep flow-bin
"flow-bin": "^0.32.0",
flow-bin
包在本地可用:
$ npm ls --depth 0 | grep flow
serverside-node-babel-mocha-flow@1.0.0 /home/mperdikeas/test-project
├── babel-plugin-transform-flow-strip-types@6.14.0
├── flow-bin@0.32.0
我的npm run flow
目标是:
cat package.json | grep \"flow\"
"flow": "flow; test $? -eq 0 -o $? -eq 2",
当我 运行 npm run flow
我得到以下跟踪:
$ npm run flow
> serverside-node-babel-mocha-flow@1.0.0 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! serverside-node-babel-mocha-flow@1.0.0 flow: `flow; test $? -eq 0 -o $? -eq 2`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serverside-node-babel-mocha-flow@1.0.0 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
当我直接从 shell 流出 运行 时(不使用 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
)工作正常。看来这跟Flow有关
Flow 需要 64 位操作系统。你有没有可能 运行 是 Ubuntu 的 32 位版本?
https://github.com/facebook/flow/issues/270 了解 Flow 当前需要 64 位的原因。