gdpr-checklist icon indicating copy to clipboard operation
gdpr-checklist copied to clipboard

error thrown while running `gatsby develop`

Open hardyoyo opened this issue 6 years ago • 3 comments

This may be a problem with my setup, I am new to Gatsby (and also Nodejs in general), it's very possible I've made a basic mistake. However, I'd like to tinker with this site's code, it's an interesting project, and a good chance to learn about Gatsby.

Anyway, enough preamble, here's the error:

When I run gatsby develop, the following error is thrown: error There was an error compiling the html.js component for the development server.

I've googled the error, it seems like it's possible some dependency is trying to do something not quite right with an object in the DOM? I don't know. The one thing I do know from my limited experience with Node is that sometimes the version of Node you're running matters, so I've rolled back from the standard Ubuntu package version of Node (bleeding edge 10.something) to the current LTS 8 version (8.11.2). I'll now try the current (not-LTS) 7 version. I am deleting the contents of node_modules each time I change versions, and re-running yarn to reinstall dependencies. And step backwards a few more versions just because I have a hammer. :-)

I know this may not end up being a code problem, but I suspect it might be a problem someone else runs into, so I've logged it here. Feel free to close it, but if you can help me figure this out I'd appreciate it, thanks!

hardyoyo avatar Jun 09 '18 13:06 hardyoyo

Update: well, version 6 won't work, and 7 had no impact on the mysterious "there was an error" message when running gatsby develop. I'll set this aside for now.

hardyoyo avatar Jun 09 '18 13:06 hardyoyo

I'm still not sure what's going on, however, I decided to confirm whether my Gatsby setup was correct, and tried a few of the starter projects. They all started up fine. On a whim, I decided to try creating a new gdpr-checklist site using the existing one as a starter: gatsby new gdpr-checklist https://github.com/privacyradius/gdpr-checklist and amazingly, that new site starts up fine when I run gatsby develop. I can't say what the difference might be... perhaps the gatsby starter script is slightly different than the docs in this project's README? However, I do have a working demo of the GDPR Checklist site on my notebook, so my immediate itch has been scratched. I think this issue probably needs to stay open until the README accurately reflects the steps required to set up a development version of the site. If I ever figure it out, I'll make a PR.

hardyoyo avatar Jun 11 '18 15:06 hardyoyo

I am also getting errors at this point.

/opt/gdpr-checklist# gatsby develop success delete html and css files from previous builds — 0.012 s success open and validate gatsby-config — 0.009 s success copy gatsby files — 0.034 s error UNHANDLED EXCEPTION

Error: Cannot find module '../build/Release/sharp.node'

  • v8-compile-cache.js:159 require [gdpr-checklist]/[v8-compile-cache]/v8-compile-cache.js:159:20

  • constructor.js:10 Object. [gdpr-checklist]/[sharp]/lib/constructor.js:10:15

  • v8-compile-cache.js:178 Module._compile [gdpr-checklist]/[v8-compile-cache]/v8-compile-cache.js:178:30

  • v8-compile-cache.js:159 require [gdpr-checklist]/[v8-compile-cache]/v8-compile-cache.js:159:20

  • index.js:3 Object. [gdpr-checklist]/[sharp]/lib/index.js:3:15

  • v8-compile-cache.js:178 Module._compile [gdpr-checklist]/[v8-compile-cache]/v8-compile-cache.js:178:30

  • v8-compile-cache.js:159 require [gdpr-checklist]/[v8-compile-cache]/v8-compile-cache.js:159:20

  • index.js:521 Object. [gdpr-checklist]/[gatsby-plugin-sharp]/index.js:521:13

  • v8-compile-cache.js:178 Module._compile [gdpr-checklist]/[v8-compile-cache]/v8-compile-cache.js:178:30

But I am not sure why it can't find the module.

ghost avatar Sep 20 '18 09:09 ghost