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

Unable to build locally #200

Closed
markingram opened this issue Feb 9, 2017 · 8 comments
Closed

Unable to build locally #200

markingram opened this issue Feb 9, 2017 · 8 comments

Comments

@markingram
Copy link

markingram commented Feb 9, 2017

I'd like to customise the colour scheme of (the rather excellent) ReDoc utility. The only way I can see of doing this is updating the SASS and building locally. However, when I attempt to run npm run build-dist from the ReDoc directory I hit a wall of errors.

> redoc@1.8.0 build-dist C:\Users\MarkIngram\Documents\GitHub\ReDoc
> npm run build:prod


> redoc@1.8.0 build:prod C:\Users\MarkIngram\Documents\GitHub\ReDoc
> npm run clean:aot && npm run build:sass && npm run webpack:prod


> redoc@1.8.0 clean:aot C:\Users\MarkIngram\Documents\GitHub\ReDoc
> npm run rimraf -- .tmp compiled lib/**/*.css


> redoc@1.8.0 rimraf C:\Users\MarkIngram\Documents\GitHub\ReDoc
> rimraf ".tmp" "compiled" "lib/**/*.css"


> redoc@1.8.0 build:sass C:\Users\MarkIngram\Documents\GitHub\ReDoc
> node-sass -q -o lib lib


> redoc@1.8.0 webpack:prod C:\Users\MarkIngram\Documents\GitHub\ReDoc
> webpack --config build/webpack.prod.js --profile --bail

Starting compilation using the angular compiler.
Angular compilation done, starting webpack bundling.

[at-loader] Using typescript@2.1.5 from typescript and "tsconfig.json" from C:\Users\MarkIngram\Documents\GitHub\ReDoc\tsconfig.webpack.json.


[at-loader] Checking started in a separate process...

[at-loader] Checking finished with 50 errors
Error in bail mode: [at-loader] TS2688: Cannot find type definition file for 'node'.

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "webpack:prod"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! redoc@1.8.0 webpack:prod: `webpack --config build/webpack.prod.js --profile --bail`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redoc@1.8.0 webpack:prod script 'webpack --config build/webpack.prod.js --profile --bail'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the redoc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack --config build/webpack.prod.js --profile --bail
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs redoc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls redoc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\MarkIngram\Documents\GitHub\ReDoc\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:prod"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! redoc@1.8.0 build:prod: `npm run clean:aot && npm run build:sass && npm run webpack:prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redoc@1.8.0 build:prod script 'npm run clean:aot && npm run build:sass && npm run webpack:prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the redoc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run clean:aot && npm run build:sass && npm run webpack:prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs redoc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls redoc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\MarkIngram\Documents\GitHub\ReDoc\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-dist"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! redoc@1.8.0 build-dist: `npm run build:prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redoc@1.8.0 build-dist script 'npm run build:prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the redoc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build:prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs redoc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls redoc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\MarkIngram\Documents\GitHub\ReDoc\npm-debug.log`

Additionally, the npm-debug.log file that's mentioned is not present. Can you please help me get the build functioning or, alternatively, show me how to best customise the colour scheme another way? Thanks!

FYI: I tried this with node.js v7.4.0 and then again after upgrading to v7.5.0 but no difference.

@RomanHotsiy
Copy link
Member

@markingram pull latest commits and try building now. It should work now.

Regarding of how to customize color scheme:
I do not recommend approach with building your own version of ReDoc as it will require merging all my fixes/improvements if you want to get them. For one-time use it is the easiest approach so far :(

Some of docs that use ReDoc add css styles to the page that overwrite ReDoc ones. Examples:

We know about this issue and are considering some theming support. It is the next item on our roadmap.

I'm curios of how much you want to customize your doc. Would you be satisfied with just accent color?

@markingram
Copy link
Author

Really I just want to change the blue text in the image below to a different shade of blue to tie in with our brand logo. Thanks for the reference examples. They look to be helpful.

image

@RomanHotsiy
Copy link
Member

@markingram then I suggest you to add css styles overwriting ReDoc ones. The one thing is you have to increase specificity of css selectors. For that you can can use one of attribute set on your <redoc> tag, e.g. spec-url. E.g. start all you css selectors with:

redoc[spec-url] h1 {
    color: red;
}

Let me know if build works for you so I can close this issue. thanks

@RomanHotsiy
Copy link
Member

Closing this issue.
Feel free to reopen in case build still fails.

But this is issue number 200 so it is doomed to be OK 😂

@markingram
Copy link
Author

No joy, I'm afraid. I did a fresh pull from master this morning but the npm run build-dist continues to fail but with a slightly different error message: webpack rather than node seems to be missing.

> redoc@1.8.0 build-dist C:\Users\MarkIngram\Documents\GitHub\ReDoc
> npm run build:prod


> redoc@1.8.0 build:prod C:\Users\MarkIngram\Documents\GitHub\ReDoc
> npm run clean:aot && npm run build:sass && npm run webpack:prod


> redoc@1.8.0 clean:aot C:\Users\MarkIngram\Documents\GitHub\ReDoc
> npm run rimraf -- .tmp compiled lib/**/*.css


> redoc@1.8.0 rimraf C:\Users\MarkIngram\Documents\GitHub\ReDoc
> rimraf ".tmp" "compiled" "lib/**/*.css"


> redoc@1.8.0 build:sass C:\Users\MarkIngram\Documents\GitHub\ReDoc
> node-sass -q -o lib lib


> redoc@1.8.0 webpack:prod C:\Users\MarkIngram\Documents\GitHub\ReDoc
> webpack --config build/webpack.prod.js --profile --bail

Starting compilation using the angular compiler.
Angular compilation done, starting webpack bundling.

[at-loader] Using typescript@2.1.5 from typescript and "tsconfig.json" from C:\Users\MarkIngram\Documents\GitHub\ReDoc\tsconfig.webpack.json.


[at-loader] Checking started in a separate process...

[at-loader] Checking finished with 50 errors
Error in bail mode: [at-loader] TS2688: Cannot find type definition file for 'webpack'.

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "webpack:prod"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! redoc@1.8.0 webpack:prod: `webpack --config build/webpack.prod.js --profile --bail`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redoc@1.8.0 webpack:prod script 'webpack --config build/webpack.prod.js --profile --bail'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the redoc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack --config build/webpack.prod.js --profile --bail
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs redoc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls redoc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\MarkIngram\Documents\GitHub\ReDoc\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:prod"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! redoc@1.8.0 build:prod: `npm run clean:aot && npm run build:sass && npm run webpack:prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redoc@1.8.0 build:prod script 'npm run clean:aot && npm run build:sass && npm run webpack:prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the redoc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run clean:aot && npm run build:sass && npm run webpack:prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs redoc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls redoc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\MarkIngram\Documents\GitHub\ReDoc\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-dist"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! redoc@1.8.0 build-dist: `npm run build:prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redoc@1.8.0 build-dist script 'npm run build:prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the redoc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build:prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs redoc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls redoc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\MarkIngram\Documents\GitHub\ReDoc\npm-debug.log

@RomanHotsiy
Copy link
Member

Did you npm install after pulling latest?

@markingram
Copy link
Author

I did, yes.

RomanHotsiy added a commit that referenced this issue Feb 14, 2017
@RomanHotsiy
Copy link
Member

Caused by to s-panferov/awesome-typescript-loader#252
workarounded this by a40d8d7

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