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

Cannot load YAML file (Version 3.0.0) #61

Closed
raksit31667 opened this issue Mar 22, 2018 · 2 comments
Closed

Cannot load YAML file (Version 3.0.0) #61

raksit31667 opened this issue Mar 22, 2018 · 2 comments

Comments

@raksit31667
Copy link

I attempted to load YAML to use as following code below:

const swaggerUI = require('swagger-ui-express')
const YAML = require('yamljs')
const path = require('path')
const swaggerDocument = YAML.load(path.join(__dirname, '/swagger.yaml'))
app.use('/api-docs', swaggerUI.serve, swaggerUI.setup(swaggerDocument))

When I tried to npm start it displayed the error like this:

fs.js:667 return binding.open(pathModule.toNamespacedPath(path),

Error: ENOENT: no such file or directory, open '<directory>/node_modules/swagger-ui-express/swagger-ui-init.js'

However, I reverted back to version 2.0.15 and it worked.

@scottie1984
Copy link
Owner

Sorry about that - can you try 3.0.1? I have revert the broken commit and will look into it further later.

@raksit31667
Copy link
Author

I've recently changed to version 3.0.1 and it's working, looking forward to receiving updates.

Thank you very much.

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