This repository was archived by the owner on Apr 3, 2024. It is now read-only.
  
  
  - 
                Notifications
    You must be signed in to change notification settings 
- Fork 18
    This repository was archived by the owner on Apr 3, 2024. It is now read-only.
  
  
Gatsby develop crashes on type errors #36
Copy link
Copy link
Closed
Description
I am just converting a rather small gatsby project to typescript using this awesome plugin. It seems to be a lot better than the default typescript plugin.
But I have come across one quite annoying behavior: When running gatsby develop it seems to crash after some type errors occured. Here is an example:
ERROR #98123  WEBPACK
Generating SSR bundle failed
ERROR in /....../src/templates/DogTemplate.tsx(73,33):
TS2605: JSX element type '{} | null' is not a constructor function for JSX elements.
  undefined
not finished Generating image thumbnails - 61.696s
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'develop' ]
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
16 pages                                             In Progress                                             bsf-website
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] develop: `gatsby develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] develop 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/xxx/.npm/_logs/2020-02-01T22_09_00_221Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npm run develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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/xxx/.npm/_logs/2020-02-01T22_09_00_248Z-debug.log
This can be quite annoying as type errors are expected during development and the dev server should simply display those errors on a console (ideally in browser and terminal) without crashing.
Is this a known behavior or is it something I'm doing wrong on my end?
Metadata
Metadata
Assignees
Labels
No labels