Reputation: 43
Does anyone know why I'm getting the following error :
Verify run directory
10:47:31 PM:
10:47:31 PM: ┌─────────────────────────────┐
10:47:31 PM: │ Netlify Build │
10:47:31 PM: └─────────────────────────────┘
10:47:31 PM:
10:47:31 PM: ❯ Version
10:47:31 PM: @netlify/build 1.0.16
10:47:31 PM:
10:47:31 PM: ❯ Flags
10:47:31 PM: mode: buildbot
10:47:31 PM:
10:47:31 PM: ❯ Current directory
10:47:31 PM: /opt/build/repo
10:47:31 PM:
10:47:31 PM: ❯ Config file
10:47:31 PM: No config file was defined: using default values.
10:47:31 PM:
10:47:31 PM: ❯ Context
10:47:31 PM: production
10:47:31 PM:
10:47:31 PM: ┌────────────────────────────────┐
10:47:31 PM: │ 1. Build command from settings │
10:47:31 PM: └────────────────────────────────┘
10:47:31 PM:
10:47:31 PM: $ gatsby develop
10:47:34 PM: error UNHANDLED REJECTION Cannot read property 'activities' of undefined
10:47:34 PM:
10:47:34 PM:
10:47:34 PM: TypeError: Cannot read property 'activities' of undefined
10:47:34 PM:
10:47:34 PM: - utils.js:20 getGlobalStatus
10:47:34 PM: [repo]/[gatsby-cli]/lib/reporter/redux/utils.js:20:54
10:47:34 PM:
10:47:34 PM: - internal-actions.js:135 Object.startActivity
10:47:34 PM: [repo]/[gatsby-cli]/lib/reporter/redux/internal-actions.js:135:51
10:47:34 PM:
10:47:34 PM: - redux.js:483 Object.startActivity
10:47:34 PM: [repo]/[redux]/lib/redux.js:483:35
10:47:34 PM:
10:47:34 PM: - reporter-timer.js:24 Object.start
10:47:34 PM: [repo]/[gatsby-cli]/lib/reporter/reporter-timer.js:24:23
10:47:34 PM:
10:47:34 PM: - index.js:125 module.exports
10:47:34 PM: [repo]/[gatsby]/dist/bootstrap/index.js:125:12
10:47:34 PM:
10:47:34 PM: - develop.js:407 module.exports
10:47:34 PM: [repo]/[gatsby]/dist/commands/develop.js:407:36
10:47:34 PM:
10:47:34 PM: - next_tick.js:68 process._tickCallback
10:47:34 PM: internal/process/next_tick.js:68:7
10:47:34 PM:
10:47:34 PM:
10:47:34 PM: /opt/build/repo/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
10:47:34 PM: throw ex;
10:47:34 PM: ^
10:47:34 PM: TypeError: Cannot read property 'activities' of undefined
10:47:34 PM: at getGlobalStatus (/opt/build/repo/node_modules/gatsby-cli/lib/reporter/redux/utils.js:20:54)
10:47:34 PM: at createPendingActivity (/opt/build/repo/node_modules/gatsby-cli/lib/reporter/redux/internal-actions.js:106:51)
10:47:34 PM: at /opt/build/repo/node_modules/redux/lib/redux.js:483:35
10:47:34 PM: at prematureEnd (/opt/build/repo/node_modules/gatsby-cli/lib/reporter/catch-exit-signals.js:39:38)
10:47:34 PM: at Reporter.panic (/opt/build/repo/node_modules/gatsby-cli/lib/reporter/reporter.js:72:42)
10:47:34 PM: at process.on.reason (/opt/build/repo/node_modules/gatsby-cli/lib/index.js:81:21)
10:47:34 PM: at process.emit (events.js:203:15)
10:47:34 PM: at processEmit [as emit] (/opt/build/repo/node_modules/signal-exit/index.js:161:32)
10:47:34 PM: at emitPromiseRejectionWarnings (internal/process/promises.js:140:18)
10:47:34 PM: at process._tickCallback (internal/process/next_tick.js:69:34)
10:47:35 PM:
10:47:35 PM: ┌─────────────────────────────┐
10:47:35 PM: │ "build.command" failed │
10:47:35 PM: └─────────────────────────────┘
10:47:35 PM:
10:47:35 PM: Error message
10:47:35 PM: Command failed with exit code 7: gatsby develop
10:47:35 PM:
10:47:35 PM: Error location
10:47:35 PM: In Build command from settings:
10:47:35 PM: gatsby develop
10:47:35 PM:
10:47:35 PM: Resolved config
10:47:35 PM: build:
10:47:35 PM: command: gatsby develop
10:47:35 PM: publish: /opt/build/repo/public
The remaining settings seem to be working not really sure why I'm getting the following error. The previous deployment worked. The site works on my local setup too maybe there is an update to the config area I should make but to my knowledge, the current one seems correct.
My Config :
Please let direct me how to get the following fixed. Thanks!
Upvotes: 3
Views: 653
Reputation: 29011
According to this GitHub issue the problem comes from having gatsby-cli
in your dependencies, which is not necessary and in this case actually harmful.
You should remove the gatsby-cli
dependency from your project using this command:
npm r gatsby-cli
If this is not the solution, then maybe you have this issue and simply need to bump your gatsby
version (it is supposed to be fixed with 2.20.29):
npm up gatsby
If this doesn't update Gatsby, your semver string for this dependency may not allow updating. You can then try installing the latest version using npm i gatsby@latest
but you would have to pay attention to any possibly breaking changes.
Upvotes: 3