Giter Club home page Giter Club logo

Comments (16)

gustawdaniel avatar gustawdaniel commented on July 2, 2024 5

@pilotdeveloper your method does not works

I was trying both rename config file and --no-cache flag.

gatsby develop --no-cache
success open and validate gatsby-configs — 0.006 s
success load plugins — 0.257 s
success onPreInit — 0.382 s
success delete html and css files from previous builds — 0.066 s
success initialize cache — 0.008 s
success copy gatsby files — 0.015 s
success onPreBootstrap — 0.007 s
⠁ Starting to fetch data from Strapi (articles)
Starting to fetch data from Strapi (users)
error Plugin gatsby-source-strapi returned an error


  Error: Request failed with status code 403
  
  - createError.js:16 createError
    [blog]/[axios]/lib/core/createError.js:16:15
  
  - settle.js:18 settle
    [blog]/[axios]/lib/core/settle.js:18:12
  
  - http.js:201 IncomingMessage.handleStreamEnd
    [blog]/[axios]/lib/adapters/http.js:201:11
  
  - next_tick.js:63 process._tickCallback
    internal/process/next_tick.js:63:19
  

warning The gatsby-source-strapi plugin has generated no Gatsby nodes. Do you need it?
success source and transform nodes — 0.085 s
⠁ Fetch Strapi data: 76.701ms
success building schema — 0.254 s
success createPages — 0.001 s
success createPagesStatefully — 0.043 s
success onPreExtractQueries — 0.003 s
success update schema — 0.153 s
error GraphQL Error There was an error while compiling your site's GraphQL queries.
  Error: RelayParser: Encountered 1 error(s):
- Unknown field 'allStrapiArticle' on type 'Query'. Source: document `IndexQuery` file: `GraphQL request`
  
  GraphQL request (3:5)
  2:   query IndexQuery {
  3:     allStrapiArticle {
         ^
  4:       edges {
  
    
success extract queries from components — 0.134 s
success run graphql queries — 0.011 s — 5/5 558.79 queries/second
success write out page data — 0.004 s
success write out redirect data — 0.003 s
⡀ onPostBootstrapdone generating icons for manifest
success onPostBootstrap — 0.185 s

info bootstrap finished - 3.357 s

Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration .
 ERROR  Failed to compile with 1 errors                       23:49:39

 error  in ./src/pages/index.js

Module Error (from ./node_modules/eslint-loader/index.js):

/home/daniel/exp/gatsby-strapi-tutorial/blog/src/pages/index.js
  28:5  error  Cannot query field "allStrapiArticle" on type "Query"  graphql/template-strings

✖ 1 problem (1 error, 0 warnings)


 @ ./.cache/sync-requires.js 17:54-128
 @ ./.cache/app.js
 @ multi (webpack)-hot-middleware/client.js?path=/__webpack_hmr&reload=true&overlay=false ./.cache/app

✖ 「wdm」: 
ERROR in ./src/pages/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/daniel/exp/gatsby-strapi-tutorial/blog/src/pages/index.js
  28:5  error  Cannot query field "allStrapiArticle" on type "Query"  graphql/template-strings

✖ 1 problem (1 error, 0 warnings)

 @ ./.cache/sync-requires.js 17:54-128
 @ ./.cache/app.js
 @ multi (webpack)-hot-middleware/client.js?path=/__webpack_hmr&reload=true&overlay=false ./.cache/app
ℹ 「wdm」: Failed to compile.
 WAIT  Compiling...                                           23:49:39

ℹ 「wdm」: Compiling...
 ERROR  Failed to compile with 1 errors                       23:49:39

 error  in ./src/pages/index.js

Module Error (from ./node_modules/eslint-loader/index.js):

/home/daniel/exp/gatsby-strapi-tutorial/blog/src/pages/index.js
  28:5  error  Cannot query field "allStrapiArticle" on type "Query"  graphql/template-strings

✖ 1 problem (1 error, 0 warnings)


 @ ./.cache/sync-requires.js 17:54-128
 @ ./.cache/app.js
 @ multi (webpack)-hot-middleware/client.js?path=/__webpack_hmr&reload=true&overlay=false ./.cache/app

✖ 「wdm」: 
ERROR in ./src/pages/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/daniel/exp/gatsby-strapi-tutorial/blog/src/pages/index.js
  28:5  error  Cannot query field "allStrapiArticle" on type "Query"  graphql/template-strings

✖ 1 problem (1 error, 0 warnings)

 @ ./.cache/sync-requires.js 17:54-128
 @ ./.cache/app.js
 @ multi (webpack)-hot-middleware/client.js?path=/__webpack_hmr&reload=true&overlay=false ./.cache/app
ℹ 「wdm」: Failed to compile.

@lauriejim I think this issue is not solved. This tutorial is not useful if new users have a problem with it. Can I please reopen it. I will try to find the fix but have not enough experience.

In my opinion, this tutorial needs to be updated.

from strapi-examples.

jiachaosun avatar jiachaosun commented on July 2, 2024

same error

"gatsby": "^2.0.19",
"gatsby-plugin-manifest": "^2.0.5",
"gatsby-plugin-offline": "^2.0.5",
"gatsby-plugin-react-helmet": "^3.0.0",
"gatsby-source-strapi": "^0.0.3",

from strapi-examples.

jiachaosun avatar jiachaosun commented on July 2, 2024

Authenticate Strapi user
Authenticate Strapi user: 148.712ms
Starting to fetch data from Strapi (articles)
Starting to fetch data from Strapi (users)
Fetch Strapi data: 28.169ms
(node:54012) Warning: No such label 'Fetch Strapi data' for console.timeEnd()
success source and transform nodes — 0.198 s
success building schema — 0.131 s
success createPages — 0.000 s
success createPagesStatefully — 0.024 s
success onPreExtractQueries — 0.000 s
success update schema — 0.078 s
GraphQL Error Unknown field allStrapiArticle on type Query

file: /Users/sunjiachao/zhimiao_work/seag/src/pages/index.js

1 |
2 | query IndexQuery {

3 | allStrapiArticle {
| ^
4 | edges {
5 | node {
6 | id
7 | title
8 | content
9 | }
10 | }
11 | }
12 | }
13 |

from strapi-examples.

georgezouq avatar georgezouq commented on July 2, 2024

same problem Unknown field allStrapiArticles on type Query

from strapi-examples.

chandraalif avatar chandraalif commented on July 2, 2024

I got same error message too. Anyone knows how to solve this issue?

from strapi-examples.

lauriejim avatar lauriejim commented on July 2, 2024

It's caused by strapi/strapi#1911 (comment)

from strapi-examples.

clabmb avatar clabmb commented on July 2, 2024

It's caused by strapi/strapi#1911 (comment)

I followed all post and tried every possible way but there is still the error
38:5 error Cannot query field "allStrapiArticle" on type "Query" graphql/template-strings

from strapi-examples.

clabmb avatar clabmb commented on July 2, 2024

I tried

go to folder plugins\graphql.
Then, npm install graphql@git://github.com/graphql/graphql-js.git#npm

and

npm install [email protected] --save

and the error still persist

from strapi-examples.

pilotdeveloper avatar pilotdeveloper commented on July 2, 2024

Okay - I found a work around for this... @clabmb

Rename your gatsby-config.js to gatsby.config.js. Try to recompile. You should see a new error that says: error GraphQL Error Unknown field file on type Querys and placeholderImage: file(relativePath: { eq: "gatsby-astronaut.png" }) {..... (^ under file)

Once this new error appears, close your terminal, rename your gatsby.config.js back to gatsby-config.js. Restart gatsby develop and it magically works. Why? I have no idea.

from strapi-examples.

pilotdeveloper avatar pilotdeveloper commented on July 2, 2024

Actually - just use gatsby develop --no-cache

from strapi-examples.

ntloi95 avatar ntloi95 commented on July 2, 2024

I have the problem, too. Could we change the id of a node to string?

from strapi-examples.

sp-daniel-sanchez avatar sp-daniel-sanchez commented on July 2, 2024

I have the same problem too. Any idea of what can we do to fix it?

from strapi-examples.

Kostanos avatar Kostanos commented on July 2, 2024

Still have this error, and can't fix it yet. Any recommendations?

BTW. strapi seems to receive requests:

[2019-02-23T18:33:14.894Z] debug GET /articles?_limit=0 (12 ms)
[2019-02-23T18:33:14.896Z] debug GET /users?_limit=0 (13 ms)

But in gatsby I see the error

from strapi-examples.

xmqywx avatar xmqywx commented on July 2, 2024

@Kostanos the user need add authority in strapi setting page

from strapi-examples.

ptrkvsky avatar ptrkvsky commented on July 2, 2024

same here

from strapi-examples.

mathi-ideas2it avatar mathi-ideas2it commented on July 2, 2024

It seems permission error "Error: Request failed with status code 403"

Give Permission to both Article and User

from strapi-examples.

Related Issues (20)

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.