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

Install failure #83

Closed
fcaprilli opened this issue Aug 22, 2016 · 13 comments
Closed

Install failure #83

fcaprilli opened this issue Aug 22, 2016 · 13 comments

Comments

@fcaprilli
Copy link

Hello... following the instructions for running locally (I have installed node.js) - failure at the npm run jspm-install step. There is no npm-debug.log file that I can see - console output below. Thanks!

[09:21:48] Starting 'bundle'...
[09:21:49] 'bundle' errored after 1.15 s
[09:21:49] Error on fetch for redoc.module.js at file:///C:/ReDoc/redoc.module.j
s
Loading .tmp\lib\index.js
Error: ENOENT: no such file or directory, open 'C:\ReDoc\redoc.module.js
'
at Error (native)
[09:21:49] 'build' errored after 5.6 s
[09:21:49] Error in plugin 'run-sequence(bundle)'
Message:
Error on fetch for redoc.module.js at file:///C:/ReDoc/redoc.module.js
Loading .tmp\lib\index.js
ENOENT: no such file or directory, open 'C:\ReDoc\redoc.module.js'
Details:
originalErr: Error: ENOENT: no such file or directory, open 'C:\ReDoc\redoc.
module.js'
Stack:
Error on fetch for redoc.module.js at file:///C:/ReDoc/redoc.module.js
Loading .tmp\lib\index.js
Error: ENOENT: no such file or directory, open 'C:\ReDoc\redoc.module.js
'
at Error (native)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: gulp serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'gulp serve'.
npm ERR! 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! gulp serve
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 ERR! npm owner ls redoc
npm ERR! There is likely additional logging output above.

@RomanHotsiy
Copy link
Member

hello @fcaprilli. Thanks for reporting the issue.
It is only partial log so I cannot reproduce your setup.
Could you provide me with a whole console output starting from git clone.

@fcaprilli
Copy link
Author

Attached a series of files - they're numbered. Thanks!

1_git_clone.txt
2_npm_install_console.txt
3_npm_install.txt
4_npm_run_jspm-install.txt
5_npm_start.txt

@RomanHotsiy
Copy link
Member

Thanks for logs. It seems to be a windows-specific issue. I will test it on VM and let you know once I found an issue.

BTW, I'm just curious why you need to run ReDoc locally? Are you going to customize it? Because running ReDoc locally is mostly intended for development (I need to rename this section to "Development")

@fcaprilli
Copy link
Author

Hey Roman - thanks. If I don't want to deploy my documentation to the cloud, don't I have to run it locally? Am I overthinking this? How do I run this and point to a local swagger.json? Is it simple as running the page you show under deployment and point to a localhost file?

@RomanHotsiy
Copy link
Member

RomanHotsiy commented Aug 22, 2016

If I don't want to deploy my documentation to the cloud, don't I have to run it locally?
Is it simple as running the page you show under deployment and point to a localhost file?

yes, just copy the example from deployment section and change spec-url to the localhost swagger file. The one limitation: it doesn't work with file:/// protocol so you need to host both index.html and swagger.json under any HTTP server.

for example: put index.html (copied from deployment) and swagger.json to the same folder, modify spec-url to this:

<redoc spec-url='swagger.json'></redoc>

and serve contents of the folder using any HTTP-server, e.g.

$ python -m SimpleHTTPSerever

then just access localhost on the corresponding port (8000 for SimpleHTTPSerever case) and you will see your spec docs :)

Let me know if you need any further help.

Sorry for confusing docs, will fix this :)

@maneeshsahu
Copy link

I have an npm start issue on a Mac as well:

`~/dev3/Redoc $ npm start

[email protected] start /Users/maneesh.sahu/dev3/ReDoc
gulp serve

/Users/maneesh.sahu/dev3/ReDoc/build/tasks/build.js:42
gulp.task('copyDebug', () => {
^
SyntaxError: Unexpected token )
at exports.runInThisContext (vm.js:75:16)
at Module._compile (module.js:445:25)
at Object.Module._extensions..js (module.js:480:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:367:17)
at require (module.js:386:17)
at requireDir (/Users/maneesh.sahu/dev3/ReDoc/node_modules/require-dir/index.js:116:33)
at Object. (/Users/maneesh.sahu/dev3/ReDoc/gulpfile.js:2:23)
at Module._compile (module.js:462:26)

npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.13.0-pre
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: gulp serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'gulp serve'.
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! gulp serve
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! /Users/maneesh.sahu/dev3/ReDoc/npm-debug.log `

@RomanHotsiy
Copy link
Member

RomanHotsiy commented Aug 23, 2016

@maneeshsahu seems you are using an old version of node:

npm ERR! node v0.13.0-pre

This version doesn't support ES6 fat arrow functions ( () => { )
Please upgrade to at least Node 4.0LTS

@fcaprilli
Copy link
Author

fcaprilli commented Aug 23, 2016

Roman - thanks for the info. I got it running the way you suggested (simple HTML file from a local server.

Now I'm comparing the way you render the API to how the Swagger editor does. Perhaps yours is more finicky when it comes to syntax? I'll paste in a few screen shots. If you like, I can provide my json spec.

Here's the Swagger editor version - note how I have defined some elements as arrays and how I'm able to expand them to the underlying definition.

image

And here's how the same file appears in Redoc - the array elements are not clickable/expandable:
)

image

I also note the following warnings at the top of the page, which don't seem to be a problem for the Swagger editor:

No "type" specified at "#/definitions/Summaries". Automatically detected: "object"
No "type" specified at "/definitions/Summaries/properties/wirelineCustomerSummaryList". Automatically detected: "object"
No "type" specified at "/definitions/Summaries/properties/wirelessAccountSummaryList". Automatically detected: "object"
No "type" specified at "/definitions/Summaries/properties/seatGroupingList". Automatically detected: "object"
No "type" specified at "/definitions/Summaries/properties/standbyModeList". Automatically detected: "object"
No "type" specified at "#/definitions/Status". Automatically detected: "object"
No "type" specified at "#/definitions/Status". Automatically detected: "object"

Here's a snippet from my YAML file for one of those definitions:

WirelessAccountSummary:
properties:
name:
$ref: "#/definitions/NameInfo"
businessName:
type: string
billingAccountNum:
type: string
currentBalanceAmt:
type: number
format: double
accountTypeCd:
type: string
accountSubTypeCd:
type: string

Thanks!

@RomanHotsiy
Copy link
Member

@fcaprilli

I got it running the way you suggested

Great!

If you like, I can provide my json spec.

Yes, would be fine. It will help a lot

@fcaprilli
Copy link
Author

Can I send it privately? Not that there are any trade secrets embedded, but - just in case ;)

Also - you want the YAML? JSON? both?

@fcaprilli
Copy link
Author

p.s. very excited about this - it's exactly what I've been looking for!

@RomanHotsiy
Copy link
Member

yes, send it to my email (you can find it in my GitHub profile)

YAML? JSON? both?

Send either yaml or json. Doesn't matter.

@RomanHotsiy
Copy link
Member

RomanHotsiy commented Aug 23, 2016

@fcaprilli I've checked your spec and this is a ReDoc bug. I reported it as a separate issue - #84
Will try to ship the fix in the next release

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

3 participants