joarwilk / gql2flow

Convert a GraphQL Schema to a flow definition
97 stars 24 forks source link

Cannot find module 'graphql/utilities' #32

Open danielkcz opened 7 years ago

danielkcz commented 7 years ago

I am not sure why it's happening. I am running the command gql2flow http://localhost:3000/graphql inside my project folder where graphql module installed. It should be able to find it yet fails...

Error: Cannot find module 'graphql/utilities'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\users\DarkMaster\AppData\Roaming\nvm\v8.1.4\node_modules\gql2flow\util\fetcher.js:7:5)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

I am on Windows 10 x64, Node 8.1.4

carleryd commented 6 years ago

I solved it by installing it locally

npm i --save-dev gql2flow
./node_modules/gql2flow/index.js schema.json