Code Monkey home page Code Monkey logo

elm-graphql's People

Contributors

coco98 avatar karthikvt26 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

elm-graphql's Issues

npm i crashes with node 12 (current version)

Doing this on an unmodified repo at 5d978d9. Ran using my local node and discovered the problem. Verified by building with docker docker run -exec -ti -v $(pwd):/node_app node:12 bash -- same issue.

image

Here are the error-y parts of the verbose log

33230 silly saveTree | |   | `-- [email protected]
33230 silly saveTree | |   `-- [email protected]
33230 silly saveTree | `-- [email protected]
33230 silly saveTree `-- [email protected]
33231 warn [email protected] No repository field.
33232 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
33233 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
33234 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
33234 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
33234 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
33234 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
33235 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/elm-test/node_modules/chokidar/node_modules/fsevents):
33236 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
33237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
33237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
33237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
33237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
33238 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/elm-test/node_modules/fsevents):
33239 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
33240 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
33240 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
33240 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   linux
33240 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
33241 verbose stack Error: [email protected] install: `binwrap-install`
33241 verbose stack Exit status 1
33241 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
33241 verbose stack     at EventEmitter.emit (events.js:196:13)
33241 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
33241 verbose stack     at ChildProcess.emit (events.js:196:13)
33241 verbose stack     at maybeClose (internal/child_process.js:1011:16)
33241 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:268:5)
33242 verbose pkgid [email protected]
33243 verbose cwd /node_app
33244 verbose Linux 4.9.93-boot2docker
33245 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
33246 verbose node v12.2.0
33247 verbose npm  v6.9.0
33248 error code ELIFECYCLE
33249 error errno 1
33250 error [email protected] install: `binwrap-install`
33250 error Exit status 1
33251 error Failed at the [email protected] install script.
33251 error This is probably not a problem with npm. There is likely additional logging output above.
33252 verbose exit [ 1, true ]

a number of problems setting up app

Following steps here: https://github.com/hasura/elm-graphql#running-the-app-yourself

Looking at steps wasn't clear how the first two steps related to the rest:

  • Deploy Postgres and GraphQL Engine on Heroku
  • Get the Heroku app URL (say todo-mvc-elm-backend1.herokuapp.com)

So I started with "Clone this repo:".

  1. Goto hasura/ and edit config.yaml

There is no hasura top-level directory.

I modified the the endpoint in schema/config.yaml instead

$ cat schema/config.yaml
endpoint: https://todo-mvc-elm-backend1.herokuapp.com
access_key: secret123
  1. Running hasura migrate apply fails:
$ hasura migrate apply
FATA[0000] validating current directory failed: validate: cannot find [config.yaml, migrations] | search stopped at filesystem boundary 

If I cd into schema first the migration succeeds:

$ cd schema
[schema ruby-2.6.3 (master)]$ hasura migrate apply
INFO migrations applied                           
  1. There is no graphql_url in src/Main.elm. It is located in src/GraphQLClient.elm and already has the value: "https://todo-mvc-elm-backend1.herokuapp.com/v1alpha1/graphql"

  2. The const that needs to be updated in src/index.js appears to be GRAPHQL_URI not HASURA_GRAPHQL_URL. GRAPHQL_URI is already set to: 'todo-mvc-elm-backend1.herokuapp.com/v1alpha1/graphql'

  3. The npm commands to install dependencies and generate the Elm code with elm-graphql need to be run in the elm-app/ dir not in the root of the repository.

6 In order to generate the Elm code for the url in the generate-graph-types script invocation in elm-app/package.json also needs to be updated.

Original:

    "generate-graph-types": "elm-graphql http://localhost:8080/v1alpha1/graphql --base Hasura --header 'x-hasura-admin-secret: secret123'"

Updated:

    "generate-graph-types": "elm-graphql https://todo-mvc-elm-backend1.herokuapp.com/v1alpha1/graphql --base Hasura --header 'x-hasura-admin-secret: secret123'"
  1. Running npm start in directory elm-app/ succeeds but web app just displays: "Sign in" page. Registration does not work.

The signup and login urls in src/Main.elm are referencing: https://guarded-woodland-47581.herokuapp.com`. Changing these to: https://todo-mvc-elm-backend1.herokuapp.com and attempting to register also fails.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.