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

Got error on first build #12

Open
jpnathan90 opened this issue Jan 29, 2020 · 9 comments
Open

Got error on first build #12

jpnathan90 opened this issue Jan 29, 2020 · 9 comments

Comments

@jpnathan90
Copy link

Hi,

Thanks for the Nice template. I faced few issues during initial installation. 1st one is access key issue.
That I created from livingdocs and that issue got Fixed. Now i am struggling run the application. I am getting below error, when I ran the gatsby develop

error Plugin gatsby-source-livingdocs returned an error


  Error: deserializing component failed:           unknown component '1-teaser-row' in design [email protected]

  - livingdocs-framework.js:7 n
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:7:60698

  - livingdocs-framework.js:7 Function.i.error.t [as error]
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:7:60958

  - livingdocs-framework.js:1 i
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:1:818

  - livingdocs-framework.js:9 Object.fromJson
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:9:90137

  - livingdocs-framework.js:7 t.exports.addContent
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:7:65903

  - livingdocs-framework.js:7 e.call
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:7:65714

  - livingdocs-framework.js:7 t.exports.<anonymous>
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:7:65618

  - livingdocs-framework.js:7 t.exports.initializeContent
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:7:65695

  - livingdocs-framework.js:7 new t.exports
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:7:61385

  - livingdocs-framework.js:9 Function.create
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:9:87211

  - livingdocs-framework.js:9 Object.createLivingdoc
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:9:85170

  - livingdocs-framework.js:9 Object.create
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/framework/livingdocs-framework.js:9:85266

  - index.js:27 Object.create
    [gatsby-magazine-example]/[@livingdocs]/node-sdk/document/index.js:27:27

  - gatsby-node.js:43 getPublication
    C:/projects/gatsby/gatsby-magazine-example/plugins/gatsby-source-livingdocs/gatsby-node.js:43:38

  - gatsby-node.js:69 processPublication
    C:/projects/gatsby/gatsby-magazine-example/plugins/gatsby-source-livingdocs/gatsby-node.js:69:24

  - gatsby-node.js:99 createNodes
    C:/projects/gatsby/gatsby-magazine-example/plugins/gatsby-source-livingdocs/gatsby-node.js:99:30


success source and transform nodes — 3.493 s
success building schema — 0.524 s
success createPages — 0.112 s
success createPagesStatefully — 0.131 s
success onPreExtractQueries — 0.005 s
success update schema — 0.262 s
error GraphQL Error Unknown field `authors` on type `metadata_2`

  file: C:/projects/gatsby/gatsby-magazine-example/src/templates/article.js

   1 |
   2 |   query($slug: String!) {
   3 |     publications(extra: {slug: {eq: $slug}}) {
   4 |       publication {
   5 |         metadata {
>  6 |           authors {
     |           ^
   7 |             references {
   8 |               id
   9 |             }
  10 |           }
  11 |           title
  12 |           description
  13 |         }
  14 |       }
  15 |       extra {
  16 |         html

success extract queries from components — 0.187 s
⠁
 ERROR

(node:6044) DeprecationWarning: Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.

success run graphql queries — 0.120 s — 19/19 163.69 queries/second
success write out page data — 0.050 s
success write out redirect data — 0.002 s
⠄ onPostBootstrapdone generating icons for manifest
success onPostBootstrap — 0.186 s

info bootstrap finished - 21.131 s

 DONE  Compiled successfully in 4203ms                                                                                                                       11:07:38 PM
⠀
⠀
You can now view livingdocs-gatsby-magazine in the browser.
⠀
  http://localhost:8000/
⠀
View GraphiQL, an in-browser IDE, to explore your site's data and schema
⠀
  http://localhost:8000/___graphql
⠀
Note that th
e development build is not optimized.
To create a production build, use gatsby build
⠀
info i 「wdm」:
info i 「wdm」: Compiled successfully. ```

Can you please help me to resolve the issue
@mokimo
Copy link
Contributor

mokimo commented Jan 29, 2020

Hey, I got an idea what it could be and will take a look at it

@jpnathannew
Copy link

May I know when you will fix this issue?

@jpnathannew
Copy link

@mokimo I am waiting for your response

@mokimo
Copy link
Contributor

mokimo commented Jan 31, 2020

Hey, I've pushed some fixxes - I tested it with a newly set up project using Living-times

Screen Shot 2020-01-31 at 10 45 35

@jpnathannew
Copy link

Thank you so much man. let me test it and confirm by tonight IST.

I have one doubt I have 2 small news website. One is codeigniter framework and another one is Wordpress. Both platforms APIs are available. I am planning to integrate this theme? Is it possible?

@jpnathan90
Copy link
Author

I am getting another error. When I ran the **

gatsby develop

**
I am getting below error

 ERROR

The above error occurred in the <StoreStateProvider> component:
    in StoreStateProvider
    in App

React will try to recreate this component tree from scratch using the error boundary you provided, App.


 ERROR

Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.


 ERROR

UNHANDLED REJECTION Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.



  Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for o  ne of the following reasons:
  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
  See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.

  - react.development.js:1590 resolveDispatcher
    [gatsby-magazine-example]/[gatsby]/[react]/cjs/react.development.js:1590:13

  - react.development.js:1618 useState
    [gatsby-magazine-example]/[gatsby]/[react]/cjs/react.development.js:1618:20

  - context.js:17 StoreStateProvider
    [gatsby-magazine-example]/[gatsby]/[gatsby-cli]/lib/reporter/loggers/ink/context.js:17:41

  - react-reconciler.development.js:6036 renderWithHooks
    [gatsby-magazine-example]/[react-reconciler]/cjs/react-reconciler.development.js:6036:18

  - react-reconciler.development.js:8570 mountIndeterminateComponent
    [gatsby-magazine-example]/[react-reconciler]/cjs/react-reconciler.development.js:8570:13

  - react-reconciler.development.js:9938 beginWork$1
    [gatsby-magazine-example]/[react-reconciler]/cjs/react-reconciler.development.js:9938:16

  - react-reconciler.development.js:11563 Object.invokeGuardedCallbackImpl
    [gatsby-magazine-example]/[react-reconciler]/cjs/react-reconciler.development.js:11563:10

  - react-reconciler.development.js:11740 invokeGuardedCallback
    [gatsby-magazine-example]/[react-reconciler]/cjs/react-reconciler.development.js:11740:31

  - react-reconciler.development.js:15778 beginWork$$1
    [gatsby-magazine-example]/[react-reconciler]/cjs/react-reconciler.development.js:15778:7

  - react-reconciler.development.js:14696 performUnitOfWork
    [gatsby-magazine-example]/[react-reconciler]/cjs/react-reconciler.development.js:14696:12


@mokimo
Copy link
Contributor

mokimo commented Jan 31, 2020

This seems to be an issue outside of this boilerplate setup, it mentions hooks but this is on React 16.7 so there are no hooks yet unless you upgrade it yourself.

I'd try a fresh project in livingdocs and a fresh installation of the boilerplate

@jpnathan90
Copy link
Author

I tried the initial setup based on your readme file. I am using windows laptop. can you please help me to fix this issue.

@jpnathan90
Copy link
Author

I found the reason. 2 react are running inside this application. that is the reason for this issue.
One is from package.json and another one is gatsby-cli. I tried to remove one by one. But everywhare I am getting error. Please check it

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