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

Config file not found #257

Closed
finnure opened this issue Apr 1, 2022 · 7 comments
Closed

Config file not found #257

finnure opened this issue Apr 1, 2022 · 7 comments

Comments

@finnure
Copy link

finnure commented Apr 1, 2022

When running spectaql apidocs.config.yml using version 1.0.0 I now get an error saying apidocs.config.yml does not exists. spectaql expects the config file to be in the node_moduesl/spectaql folder instead of the project root folder.

image

@newhouse
Copy link
Collaborator

newhouse commented Apr 1, 2022

Ugh, sorry, will fix. For now, if you put a full path to your file, things should work:
spectaql /full/path/to/apidocs.config.yml

@newhouse
Copy link
Collaborator

newhouse commented Apr 1, 2022

@finnure @mxseev

Please try again with 1.0.2 and let me know if things are working?

@mxseev
Copy link

mxseev commented Apr 1, 2022

Yup, but another bug there

~/D/P/-api ❯❯❯ cat package.json | grep spectaql                                                             
    "build:docs": "spectaql spectaql.yaml -t public/docs",
    "spectaql": "^1.0.2",
~/D/P/-api ❯❯❯ npm run build:docs                                                                            

> [email protected] build:docs
> spectaql spectaql.yaml -t public/docs

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module './dist'
Require stack:
- /Users/mxseev/Documents/Projects/-api/node_modules/spectaql/index.js
- /Users/mxseev/Documents/Projects/-api/node_modules/spectaql/bin/spectaql.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/mxseev/Documents/Projects/-api/node_modules/spectaql/index.js:2:58)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/mxseev/Documents/Projects/-api/node_modules/spectaql/index.js',
    '/Users/mxseev/Documents/Projects/-api/node_modules/spectaql/bin/spectaql.js'
  ]
}
~/D/P/-api ❯❯❯

@newhouse
Copy link
Collaborator

newhouse commented Apr 1, 2022

@mxseev

Double-ugh. Bad publish. Please try 1.0.3?!

@mxseev
Copy link

mxseev commented Apr 1, 2022

Is glob support for input files removed in 1.0?

~/D/P/-api ❯❯❯ cat package.json | grep spectaql                                                             ✘ 1 main ✭ ✱
    "build:docs": "spectaql spectaql.yaml -t public/docs",
    "spectaql": "^1.0.3",
~/D/P/-api ❯❯❯ npm run build:docs                                                                               main ✭ ✱

> [email protected] build:docs
> spectaql spectaql.yaml -t public/docs

/Users/mxseev/Documents/Projects/-api/node_modules/spectaql/dist/spectaql/graphql-loaders.js:53
      throw new Error(`GraphQL schema file does not exist at ${path}`);
      ^

Error: GraphQL schema file does not exist at /Users/mxseev/Documents/Projects/-api/src/schema/*.graphql
introspection:
  schemaFile: ./src/schema/*.graphql
  metadataFile: ./src/schema/spectaql.json

@newhouse
Copy link
Collaborator

newhouse commented Apr 1, 2022

@mxseev fixed in 1.0.4.

@mxseev
Copy link

mxseev commented Apr 1, 2022

And everything is working great!
Thank you very much, it was a pleasure to participate.

@newhouse newhouse closed this as completed Apr 1, 2022
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

3 participants