swagger-editor-live
swagger-editor-live copied to clipboard
local npm install: "no such file or directory node_modules/swagger-editor-dist/"
I started to use swagger-editor-live and it does exactly what I was looking for swagger-editor version 3. It works but I had a strange issue that I wanted to report. Sorry if the issue is related to my environment but I don't think it is.
- I installed swagger-editor-live locally to my project:
npm install swagger-editor-live --save-dev
- Then declared this script in my own package.json:
"swagger:edit": "swagger-editor-live swagger/swagger.yaml --port=8000"
- Then run it:
npm run swagger:edit
- And it complained about missing swagger-editor-dist dependcy in the swagger-editor-dist/node_modules:
Error: ENOENT: no such file or directory, stat '/home/me/myproject/node_modules/swagger-editor-live/node_modules/swagger-editor-dist/swagger-editor.css'
Error: ENOENT: no such file or directory, stat '/home/me/myproject/node_modules/swagger-editor-live/node_modules/swagger-editor-dist/swagger-editor-bundle.js'
Error: ENOENT: no such file or directory, stat '/home/me/myproject/node_modules/swagger-editor-live/node_modules/swagger-editor-dist/swagger-editor-standalone-preset.js'
Actually the only dependency that was existing in /home/me/myproject/node_modules/swagger-editor-live/node_modules/
was commander
(weird).
So I did that:
cd /home/me/myproject/node_modules/swagger-editor-live
npm install
And now everything's fine. I just wanted to let you know in case something would be wrong uin the npm released package of swagger-editor-live. If not then please forgive me and thanks for this useful module.