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 fails #10

Open
CodeJjang opened this issue Sep 18, 2016 · 9 comments
Open

Npm install fails #10

CodeJjang opened this issue Sep 18, 2016 · 9 comments

Comments

@CodeJjang
Copy link

Installing the module in a fresh Sails.js project and getting the following error:

npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN skippingAction Module is inside a symlinked module: not running add abbrev@1.0.9 node_modules/abbrev
npm WARN skippingAction Module is inside a symlinked module: not running move nopt@2.0.0 node_modules/nopt
npm WARN skippingAction Module is inside a symlinked module: not running remove abbrev@1.0.7 node_modules/sails/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/noptify/node_modules/nopt/node_modules/abbrev
npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "swagger-combined" "--save"
npm ERR! node v4.4.2
npm ERR! npm  v3.10.6
npm ERR! path /home/***/Desktop/***/swagger-service/node_modules/swagger-combined/run.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/home/***/Desktop/***/swagger-service/node_modules/swagger-combined/run.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/***/Desktop/***/swagger-service/node_modules/swagger-combined/run.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/***/Desktop/***/swagger-service/npm-debug.log

@thanhson1085
Copy link
Owner

Thank for your report. I have pushed a commit to solve it. Please try to reinstall

npm install --save swagger-combined@latest

@CodeJjang
Copy link
Author

Not working yet... have you published it to npm?

@CodeJjang
Copy link
Author

CodeJjang commented Sep 18, 2016

And another issue. I'm using 1.3.4 now.
Cannot reach the swagger UI.

The /docs route works well, but when I access the app in it's default port e.g. http://localhost:3000 then I'm redirected to http://localhost:3000/s?url=/docs but receiving 404 Not Found.

@thanhson1085
Copy link
Owner

I think you should use the latest version. In case swagger site does not work, you can use link http://petstore.swagger.io/?url=http://localhost:3000/docs

@CodeJjang
Copy link
Author

CodeJjang commented Sep 18, 2016

Yeah but I want to be able to serve the UI by myself and not depend on external swagger.io.
Do you have any explanations why it's not working? Maybe I have to configure something which the README missed?
Now I have to install swagger-ui by myself and figure out how to serve it...

@thanhson1085
Copy link
Owner

Did you try Installation & Run from Source Code?

@CodeJjang
Copy link
Author

CodeJjang commented Sep 18, 2016

No I haven't... why would I run from source code? :P
I want to consume the module just as normal node module via npm installing.
By the way, is app.js missing in latest version?

@thanhson1085
Copy link
Owner

I removed "install and run via NPM". Actually, Swagger Combined should run as an independent service. app.js now should be routes/app.js

@CodeJjang
Copy link
Author

Would swagger-ui work in that way?
Because I've just made a service of mine that serves the swagger-ui, and now instead to serve the /docs JSON from the same service I have to lift your service as well, in another port.

Why cant the module just be configured dynamically (without a static .json file which is not so scalable way to configure modules), and then supply methods to get the final combined json? That's more modular, instead of forcing the clients to use the module as an external service for some reason..

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