Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install -g bit-bin fails on Windows #78

Closed
itsMapleLeaf opened this issue Mar 9, 2017 · 5 comments
Closed

npm install -g bit-bin fails on Windows #78

itsMapleLeaf opened this issue Mar 9, 2017 · 5 comments
Assignees

Comments

@itsMapleLeaf
Copy link

After an install attempt from the VS2015 Developer's command line, it errors out:

..\src\posix.cc(2): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:\Users\kingd\
AppData\Roaming\npm\node_modules\bit-bin\node_modules\posix\build\posix.vcxproj]
@ranm8
Copy link
Member

ranm8 commented Mar 12, 2017

Thanks for reporting this issue!
We're working to resolve it and will keep this thread posted.

@amitgilad3
Copy link
Contributor

Hi @kingdaro this issue is fixed with the latest bit release

@baoduy
Copy link

baoduy commented Jul 14, 2018

Hi All
I'm still facing the issue on Window 10 event the Window-tools and Python are installed.
Please share tip how to resolve it?

  posix.cc
  win_delay_load_hook.cc
..\src\posix.cc(2): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:\Users\Steven
\AppData\Roaming\npm\node_modules\bit-bin\node_modules\posix\build\posix.vcxproj]

@dfoverdx
Copy link

dfoverdx commented Jan 15, 2019

Same here. Any update?

It looks to have something to do with a dependency on posix which doesn't (or shouldn't) apply to Windows.

> npm i -g posix

> posix@4.1.2 install C:\Users\MyUser\AppData\Roaming\npm\node_modules\posix
> node-gyp rebuild


C:\Users\MyUser\AppData\Roaming\npm\node_modules\posix>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  posix.cc
  win_delay_load_hook.cc
..\src\posix.cc(2): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [C:\Users\MyUser
\AppData\Roaming\npm\node_modules\posix\build\posix.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\MyUser\AppData\Roaming\npm\node_modules\posix
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
+ posix@4.1.2
added 2 packages from 9 contributors in 2.168s

@dfoverdx
Copy link

Nevermind. I missed the note in the installation guide regarding Windows.

Note - Windows installations

If you are using Windows, add the --no-optional flag to the install command. npm install bit-bin --global --no-optional

@baoduy Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants