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

Unclear how to lunch this #1

Open
asmyshlyaev177 opened this issue Mar 23, 2020 · 1 comment
Open

Unclear how to lunch this #1

asmyshlyaev177 opened this issue Mar 23, 2020 · 1 comment

Comments

@asmyshlyaev177
Copy link

Run npm run server-start gave me this

ERROR in Entry module not found: Error: Can't resolve './src' in '/Users/alex/covid-dashboard'

ERROR in multi (webpack)-dev-server/client?http://localhost:8080 ./src
Module not found: Error: Can't resolve './src' in '/Users/alex/covid-dashboard'
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./src main[1]

Not so easy to run it, I guess workers require https.

Can add some script for build it and run with some webserver (this for example https://www.npmjs.com/package/local-web-server)

@tobiu
Copy link
Contributor

tobiu commented Mar 23, 2020

Hi Alex,

you can ignore these 2 errors. I need to update the readme (here and inside the main framework repo) => only mentioned it inside the npx script repo:

https://github.com/neomjs/create-app#starting-a-local-web-server

After you see the errors, a new browser tab should open, looking like this:

Screenshot 2020-03-23 at 16 20 37

From there, you can navigate to the 3 different versions:

Dev Mode (Chrome 80+ only):

http://localhost:8080/apps/covid/

dist/development:

http://localhost:8080/dist/development/apps/covid/

dist/production:

http://localhost:8080/dist/production/apps/covid/

Some thoughts on this: The webpack dev-server got created for React. There, you can not open the src folder inside your browser, since the code needs to get compiled. So the dev server is supposed to get mapped to the dist folder as its root. Now in the neo.mjs context, we can and want to use the src folder as well, so I moved the root one level up, resulting in these 2 errors.

We could use a different web-server (like the one you mentioned) to make it easier for new users. We could also extend the logic on the dist/development part to use hot-module replacements there, in case you want to debug this mode. Edge casse scenario though, since you will spend most of the time outside the dist env.

There are already 2 tickets for it (inside the main repo):

neomjs/neo#95

neomjs/neo#96

Please let me know if you can get the app started inside your browser.

Best regards, Tobias

P.S.: The code of the app is also still present inside the framework repo, so you can as well clone this one (in case you want to play with the framework codebase).

https://github.com/neomjs/neo/tree/dev/apps/covid

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