Closed higimo closed 4 years ago
I'm not familiar with running scripts on Windows, do you have a clue on what might have gone wrong?
@maxlath why not rewrite postinstall to npx ./scripts/check_node_version
?
I would like to understand why it's not working as such in the first place ^^ is it that bash scripts are executed differently on Windows?
@maxlath in Windows sh is not recognized as an internal or external command.
@higimo and bash?
@maxlath and bash=) But npx is working!
Not surprisingly I got this as well, trying to install on Windows.
Per @higimo I tried changing the postinstall line to "postinstall": "npx ./scripts/check_node_version" but that also failed with "'.' is not recognized as an internal or external command" -- possibly because Windows can't make sense of the forward slashes in the filename, rather than the backslashes it expects.
So instead I've just removed the postinstall line entirely from the package.json and now the install seems to have completed fine. I hope it didn't do anything too critical, but it looked as if it was just a check.
yes it's just a check of the current node version, but now I'm very confused by what works or not on Windows o_O
should have been fixed in > v8
thank to cb06a7b, can you confirm
λ npm install wikidata-cli
'.' is not recognized as an internal or external command,
operable program or batch file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\home\wd\package.json'
npm WARN wd No description
npm WARN wd No repository field.
npm WARN wd No README data
npm WARN wd No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wikidata-cli@7.2.1 postinstall:
./scripts/postinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wikidata-cli@7.2.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.