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

Standalone app instructions result in wrong link to main.js #211

Open
blincoln-bf opened this issue Dec 23, 2021 · 0 comments
Open

Standalone app instructions result in wrong link to main.js #211

blincoln-bf opened this issue Dec 23, 2021 · 0 comments

Comments

@blincoln-bf
Copy link

I followed the instructions at https://4catalyzer.github.io/graphql-explorer/docs/standalone, and the app began being served, but I'd get a 404 for /static/main.js, i.e.:

$ npx http-server node_modules/graphql-explorer-html/build
Need to install the following packages:
  http-server
Ok to proceed? (y) y
Starting up http-server, serving node_modules/graphql-explorer-html/build

http-server version: 14.0.0

http-server settings: 
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://127.0.0.1:8080
  http://192.168.0.45:8080
  http://172.18.0.1:8080
Hit CTRL-C to stop the server

[2021-12-23T17:48:46.336Z]  "GET /" "Mozilla/5.0 [rest of User-Agent string]"
(node:2429924) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
[2021-12-23T17:48:46.445Z]  "GET /static/main.js" "Mozilla/5.0 [rest of User-Agent string]"
[2021-12-23T17:48:46.458Z]  "GET /static/main.js" Error (404): "Not found"

I tried creating a soft link to the main.js file that's right in the build directory, but Node didn't like that and would respond with:

     Error: ELOOP: too many symbolic links encountered, stat '[base path]/node_modules/graphql-explorer/html/build/static/main.js'

This worked:

mkdir node_modules/graphql-explorer-html/build/static
cp node_modules/graphql-explorer-html/build/main.js node_modules/graphql-explorer-html/build/static/

...but I'm not familiar enough with this codebase to know if there's a better/preferred way to fix the problem, like updating index.html to remove the "/static" part of the link.

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

1 participant