Closed ghost closed 5 years ago
Hmm. I'm sorry but can't reproduce on my side with exact same version of node & yarn.
Given your error, is it possible that you have multiple node versions installed on your system, and for some obscure reason the wrong one is used while installing?
The system environment is probably the wildcard. Do you know a way to configure yarn to make the correct decision? Or what other commands can I issue to narrow this down?
I have the same problem on windows I tried to update all npm, node... Windows is W7 64bits (says: (current: {"os":"win32","arch":"ia32"}) ) yarn --version : 1.3.2 npm --version : 5.6.0 node -v : v6.10.1
the message is:
info fsevents@1.1.3: The platform "win32" is incompatible with this module. info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. error flow-mono-cli@1.3.0: The engine "node" is incompatible with this module. Expected version ">=8.8.0". error Found incompatible module
I'me beginner on node.js , so maybe I missed a trivial point.
@AlainCo you need to have node >=8.8.0 at the moment because of flow-mono-cli
. we're looking at ways to remove this dependency in the future because it is a dependency pain
Thanks for the hint, I've installed node v 8.9.4 LTS through MSI installer ( don't work through : npm install node -g). https://nodejs.org/en/ It pass compatibility phase, but yarn is running since 2 hours consuming 1 virtual core... I'm impatient but optimistic.
Best regards
Thre was progress, but on Windows 7 x64, yarn hangs inside flow-mono :
'C:\Local\ws\Workspace47\ledgerjs>yarn yarn install v1.3.2 $ node -e "if (process.env.npm_execpath.indexOf('yarn') === -1) { console.log('Please use yarn'); process.exit(1); }" [1/4] Resolving packages... success Already up-to-date. $ flow-mono create-symlinks packages/hw-transport/.flowconfig && flow-mono install-types --overwrite --ignoreDeps=peer || echo 'failed to setup flow-typed'
I tried to upgrade flow-mono, flow-mono-cli, but it changes nothing.
yarn --version : 1.3.2 node --version : v8.9.4 npm --version : 5.6.0 flow-mono --version : 1.3.0
try removing the the flow-mono commands in the meantime, it only is used to generate the flow-typed/ folder, for flow. i'm not satisfied by this solution. we probably will figure out a better way...
I edited package.json
"scripts": { ... "postinstall": "echo 'NO flow-mono create-symlinks nor install-types'",
It works better
when running yarn run build
$ BABEL_ENV=production && yarn run documentation && lerna run build 'BABEL_ENV' is not recognized as an internal or external command...
I edited similarily:
build": "set BABEL_ENV=production && yarn run documentation && lerna run build",
$ set BABEL_ENV=production && yarn run documentation && lerna run build $ documentation build packages/hw-*/src/** packages/react-native-*/src/** --project-name '@ledgerhq/*' --project-version
node -e "console.log(require('./lerna.json').version)"` --project-homepage https://github.com/LedgerHQ/ledgerjs --config documentation.yml -g -f html -o packages/documentation-website/public/docs
node_modules\documentation\bin\documentation.js build [input..]
Options: --version Show version number [boolean] ... Unknown argument: e error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
I edited documentation: entry to suppress those scripts
it crashed again in "lerna" with few "export is not recognized as internal or external command..."
in
$ cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib
I see 63 similar lines in the various package.json (common,exemple-browser/node,hw-app-bts/eth/xrp,hw-hid-cli,hw-http-proxy-devserver,hw-transport,hw-transport-http, hw-transport-node-hid,hw-transport-u2f,react-native-hid,react-native-hw-transport-ble,test
I suspect it is incompatibility with windows... I don't dare to edit all, as it seems bash script... maybe it is transcripted?
I tried to use "git bash for windows" , but there is no change on any point
EDIT: I've gone further.
I commented the documentation call but lerna crash now on an export
in this line cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib
I find the code in the dozens of package.json in many folders
it seems incompatible with windows.
The situation is getting hellish. I've succeeded in using VirtualBox with Docker to compile with yarn (need activating symb links on shared volume ), but "yarn test-node" anyway fails on windows as "ledgerjs\node_modules\node-hid\build\Release\HID.node is not a valide Win32 application."
Win32 is apparently not supported, not even through docker "tricks".
How do people on Win32 work with ledger? I have missed a point because it seems too hard...
Thanks for the investigation, I have no experience in development under Windows but one of our team member @amougel is using Windows too and recently ran into the same problem when trying to run the repository. We should try to fix this.
Some points to summarize what issues we have
cd ../.. && export PATH=$(yarn bin):$PATH && cd -
<- that pattern we have everywhere will probably be simplified by directly calling ../../node_modules/.bin/babel
(or whatever bin we need)node -e "console.log(require('./lerna.json').version)"
seems to be an issue for Windows? not sure for a short-term solution, but the way we generate doc will change asap. ASAP will look at things like https://github.com/documentationjs/documentation/issues/1012#issuecomment-366012124Is that correct or did I miss something else?
Thanks for the directions. I will look at them. Someone also advised me to npm install ledgerco instead of building ledgerjs... It does not matter is the cat is grey or black, provided it catch the mouse... I'll try, thanks!
ledgerco is the previous version of this library, unmaintained tho
ok, so I'll try to edit the build directives as suggested. for node-hid failure, I suspect it is because of crosscompilation with docker... I shoudl compile on win32, which requires changes of build scripts.
Thank you very much, finaly I succeded to compile consistently on Windows, from git-bash (seems not much improving, as script inside tarn is visibly CMD).
cross-env helped, and I just had to change le lines with BABEL_ENV=... I disabled all about documentation I disabled all about flow I edited the call to babel with PATH=...$(yarn bin), into just calling babel , but setting PATH to add c:...\ledgerjs\node_modules.bin
the node-test worked yarn run test-node
I'm totally new to node.js, so I cannot much help, except play the monkey tester.
At least the USB HID messages are passing, so I will be able to understand, and maybe convert the logic to what I know (java).
Trying to verify that #15 is fixed, I cannot build the project:
versions:
On a Linux distribution.