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

Error on build after install blog component - The above error occurred in the <StoreStateProvider> component #80

Closed
edivanteixeira opened this issue Sep 14, 2020 · 3 comments

Comments

@edivanteixeira
Copy link

Hi guys, I have a little problem, after install @reflexjs/gatsby-theme-post and running :
npm run dev
I received this message:

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.
Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-base@0.3.0 dev: `gatsby clean && gatsby develop`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the gatsby-starter-base@0.3.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/edivan/.npm/_logs/2020-09-14T01_35_08_261Z-debug.log

The Log file

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/Cellar/node/14.5.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'dev'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v14.5.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle gatsby-starter-base@0.3.0~predev: gatsby-starter-base@0.3.0
6 info lifecycle gatsby-starter-base@0.3.0~dev: gatsby-starter-base@0.3.0
7 verbose lifecycle gatsby-starter-base@0.3.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle gatsby-starter-base@0.3.0~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/edivan/Projects/cafeina.io/site/node_modules/.bin:/Users/edivan/Projects/wivo/google-cloud-sdk/bin:/Users/edivan/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/edivan/Projects/wivo/google-cloud-sdk/bin:/Users/edivan/.rbenv/shims://flutter/bin:/Users/edivan/Projects/cafeina.io/site/flutter/bin
9 verbose lifecycle gatsby-starter-base@0.3.0~dev: CWD: /Users/edivan/Projects/cafeina.io/site
10 silly lifecycle gatsby-starter-base@0.3.0~dev: Args: [ '-c', 'gatsby clean && gatsby develop' ]
11 silly lifecycle gatsby-starter-base@0.3.0~dev: Returned: code: 1  signal: null
12 info lifecycle gatsby-starter-base@0.3.0~dev: Failed to exec dev script
13 verbose stack Error: gatsby-starter-base@0.3.0 dev: `gatsby clean && gatsby develop`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1051:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid gatsby-starter-base@0.3.0
15 verbose cwd /Users/edivan/Projects/cafeina.io/site
16 verbose Darwin 19.6.0
17 verbose argv "/usr/local/Cellar/node/14.5.0/bin/node" "/usr/local/bin/npm" "run" "dev"
18 verbose node v14.5.0
19 verbose npm  v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error gatsby-starter-base@0.3.0 dev: `gatsby clean && gatsby develop`
22 error Exit status 1
23 error Failed at the gatsby-starter-base@0.3.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I already try update all packages and remove the node_modules but have no success.

My package.json

{
  "name": "gatsby-starter-base",
  "version": "0.3.0",
  "private": true,
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "start": "gatsby develop",
    "serve": "gatsby serve",
    "clean": "gatsby clean",
    "dev": "gatsby clean && gatsby develop",
    "preview": "gatsby build && gatsby serve"
  },
  "dependencies": {
    "@reflexjs/gatsby-plugin-metatags": "^0.2.7",
    "@reflexjs/gatsby-theme-base": "^0.3.10",
    "@reflexjs/gatsby-theme-post": "^0.6.7",
    "gatsby": "^2.24.57",
    "npm-check-updates": "^9.0.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "typeface-inter": "^3.12.0"
  }
}
@shadcn
Copy link
Contributor

shadcn commented Sep 14, 2020

Looking into this.

@shadcn
Copy link
Contributor

shadcn commented Sep 14, 2020

@edivanteixeira Seems to be an issue with npm and yarn. I know you removed node_modules and re-installed. Can you also try the following?

  1. Remove node_modules and yarn.lock
  2. Install gatsby, react, react-dom in that order.
  3. npm install

As an alternative, if you can, using yarn instead of npm does not have this issue.

See also:

gatsbyjs/gatsby#19827
gatsbyjs/gatsby#19064

@edivanteixeira
Copy link
Author

perfect, i did it and it worked correctly.

Thank you.

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

2 participants