Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Relay 2: Cannot find module 'graphql-compiler' #85

Closed
steida opened this issue Jan 26, 2019 · 6 comments
Closed

Relay 2: Cannot find module 'graphql-compiler' #85

steida opened this issue Jan 26, 2019 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@steida
Copy link

steida commented Jan 26, 2019

relay-compiler --src . --include 'components/**' 'pages/**' --schema 'api/schema.graphql' --language typescript --artifactDirectory 'generated'

Error: Cannot find module 'graphql-compiler'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/steida/dev/este/node_modules/relay-compiler-language-typescript/lib/TypeScriptGenerator.js:21:23)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
@artola
Copy link
Contributor

artola commented Jan 27, 2019

this is listed in peerDependencies as *, like a bunch of other.
@steida If you add them, it works.

@sibelius
Copy link
Contributor

graphql-compiler was merge with relay-compiler, there is no more graphql-compiler

@artola
Copy link
Contributor

artola commented Jan 27, 2019

@sibelius then this block should updated, and assert that the change it is not breaking something else.

import * as GraphQLCompilerTypes from "graphql-compiler";

mainly require("relay-compiler/lib/GraphQLCompilerPublic"); this code does not exist anymore.

replaced by require("relay-compiler/lib/RelayCompilerPublic");

@sibelius sibelius added the help wanted Extra attention is needed label Jan 27, 2019
artola added a commit to artola/relay-compiler-language-typescript that referenced this issue Jan 28, 2019
  - update dependencies accordingly Relay v2.0.0
  - removed unused dependency @types/immutable
  - added minimalist types for RelayCompilerPublic
  - updated fixtures
  - updated test TypeScriptGenerator to support directives as v2.0.0
@artola
Copy link
Contributor

artola commented Jan 28, 2019

@sibelius @alloy @steida PR #87 to support Relay v2.0.0, removing dependency on graphql-compiler and accordingly to #78 (optionalInputFields).
One more thing, once merged this PR, could be addressed #86 (release a new package, due the changes, major).

@sibelius
Copy link
Contributor

it should be fixed here #87

@alloy
Copy link
Member

alloy commented Jan 29, 2019

Fixed by #87

@alloy alloy closed this as completed Jan 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants