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

installing bit-docs in Windows PowerShell fails #18

Open
cduivis opened this issue Jan 31, 2018 · 2 comments
Open

installing bit-docs in Windows PowerShell fails #18

cduivis opened this issue Jan 31, 2018 · 2 comments

Comments

@cduivis
Copy link

cduivis commented Jan 31, 2018

I'm trying to use the bit-docs-website to get to know the inner workings of bit-docs and experiment with it.
Sadly the npm install command fails:

PS C:\Users\c.duivis\Desktop\bit-docs-website-master> npm install

> [email protected] preinstall C:\Users\c.duivis\Desktop\bit-docs-website-master
> [ -f docs/modules/bit-docs/package.json ] || git submodule update --init

'[' is not recognized as an internal or external command,
operable program or batch file.
fatal: Not a git repository (or any of the parent directories): .git
npm ERR! code ELIFECYCLE
npm ERR! errno 128
npm ERR! [email protected] preinstall: `[ -f docs/modules/bit-docs/package.json ] || git submodule update --init`
npm ERR! Exit status 128
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\c.duivis\AppData\Roaming\npm-cache\_logs\2018-01-31T15_50_17_754Z-debug.log

It looks like the syntax that is used inside the install script is not recognized by PowerShell on Windows.

@cduivis cduivis changed the title installing bit-docs in powershell fails installing bit-docs in Windows PowerShell fails Jan 31, 2018
@leoj3n
Copy link
Contributor

leoj3n commented Oct 23, 2018

@cduivis [ in [ -f docs/modules/bit-docs/package.json ] is a synonym of the POSIX shell test utility. Unless you're running cygwin/babun or a linux VM, Windows doesn't have a POSIX shell.

To get past this limitation on Windows, you could remove the preinstall npm run-script and just manually execute git submodule update --init whenever the submodules in docs/modules haven't been initialized yet. However, you may run into other problems on Windows once you get past this step.

@cduivis
Copy link
Author

cduivis commented Feb 5, 2019

Ah ok, that's a shame.
We where looking at using this project as a platform to use for documentation of multiple coding/programming languages (Less, Sass, CSS, JavaScript, MarkDown, etc..), but because we can't run it on a Windows platform it's not useful in our development flow.

A half your after this issue was created, we found out the existence of DocFx which does seems extensible enough to support all of these languages. We currently have shifted our focus there.
It supports C#, MarkDown and JS files (I just listed the languages useful for us).

I know this project is currently still an internal project for you guys.
But for a document generation project like this I think I would be nice if it worked cross platform.

@leoj3n I'll leave it up to you to close this topic or not.

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

2 participants