openapi-viewer icon indicating copy to clipboard operation
openapi-viewer copied to clipboard

page does not load in local machine

Open naveenraina opened this issue 6 years ago • 5 comments

I ran build and then dev commands, the page (url - http://localhost:5601/) hangs and never loads. I have win 10 machine.

naveenraina avatar Mar 30 '18 05:03 naveenraina

Unfortunately, I don't have a win 10 machine. Can you run the 3 commands of the dev script in package.json in 3 different terminals ?

NODE_ENV=development webpack --watch
NODE_ENV=development nodemon server/app.js
browser-sync start --config bs-config.js

nicolas-bonnel avatar Apr 06 '18 15:04 nicolas-bonnel

I had the same problem. I get this error:

$ npm run dev

> [email protected] dev C:\PhpstormProjects\openapi-viewer
> NODE_ENV=development webpack --watch & browser-sync start --config bs-config.js & NODE_ENV=development nodemon server/app.js

'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.

In windows, to set an environment variable you need to use Set node_env=development. Then I ran 3 commands in separate windows and it worked.

here are the 3 commands:

set NODE_ENV=development&& .\node_modules\.bin\webpack.cmd --watch
set NODE_ENV=development&& .\node_modules\.bin\nodemon.cmd ".\server\app.js"
set NODE_ENV=development&&.\node_modules\.bin\browser-sync.cmd  start --config bs-config.js

scottgutman avatar Jun 01 '18 12:06 scottgutman

Thanks for the fix. We will either add it to the readme or remove the need for environment variables in development mode

nicolas-bonnel avatar Jun 01 '18 13:06 nicolas-bonnel

I removed the need for environment variables in development mode, can you tell me if it is ok ?

nicolas-bonnel avatar Jul 03 '18 09:07 nicolas-bonnel

Going on holiday, will be back in a week. ᐧ

On Tue, Jul 3, 2018 at 5:08 AM Nicolas Bonnel [email protected] wrote:

I removed the need for environment variables in development mode, can you tell me if it is ok ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/koumoul-dev/openapi-viewer/issues/7#issuecomment-402067689, or mute the thread https://github.com/notifications/unsubscribe-auth/AH24GZGrH6ctpr3mfb-me66iuWG8tZw6ks5uCzSZgaJpZM4TBUuX .

-- Scottie Gutman Signature Computer Services, Inc. (954) 579-5515 [email protected]

scottgutman avatar Jul 03 '18 17:07 scottgutman