Skip to content

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

@blincoln-bf

Description

@blincoln-bf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions