question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running a Gatsby App from node_modules - "Generating SSR bundle failed"

See original GitHub issue

Hello everyone!

I think I already read the relevant issues but I don’t think they are the same problem.

What I’m trying to do is to run a Gatsby app that I’ve published to NPM from another project, that is after installing it. The idea is to build a generic Gatsby app and overwrite some components from the root project.

However I cannot even start a fresh Gatsby app from the node_modules by using this script: cd ./node_modules/mygatsbyapp && yarn start

The error that is thrown is:

 ERROR #98123  WEBPACK

Generating SSR bundle failed

Unexpected token (31:4)

File: .cache/develop-static-entry.js:31:4

The line that causes the error has this code: <meta key="environment" name="note" content="environment=development" />

The same project runs fine when I run it as a normal project (cd mygatsbyapp && yarn start)

EDIT: This is my gatsby info output:

System:
    OS: Linux 5.2 Manjaro Linux
    CPU: (4) x64 Intel(R) Core(TM) i5 CPU       M 520  @ 2.40GHz
    Shell: 5.7.1 - /usr/bin/zsh
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: 1.17.3 - ~/.nvm/versions/node/v10.16.0/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v10.16.0/bin/npm
  Languages:
    Python: 3.8.1 - /usr/bin/python
  Browsers:
    Firefox: 71.0
  npmGlobalPackages:
    gatsby-cli: 2.8.22


Thanks and Happy new year!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
obainscommented, Apr 4, 2020

@puzzledbytheweb thank you for your comment here - this really helped me as well. Much appreciated!

1reaction
blakewilsoncommented, Jan 13, 2020

@puzzledbytheweb Gatsby Themes is exactly what I was looking for! Can’t believe I haven’t came across them yet. Thanks a lot for your response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[bug] Generating SSR bundle fails · Issue #19922 - GitHub
I ran into this exact issue, but my issue was due to inconsistent node versions. Deleting node_modules and running npm i didn't fix...
Read more >
Gatsby JS - Generating SSR bundle failed - Stack Overflow
It's an extremely broad question and lacks of trials. IE fallback could fail from infinite reasons and pieces of code.
Read more >
Generating SSR Bundle Failed (Error #98124 Webpack) - Issues
Running into an issue when trying to deploy Gatsby project on to XDN. ERROR #98124 WEBPACK. Generating SSR bundle failed. Can't resolve '…/…...
Read more >
[Storyblok, Gatsby] ERROR #98124 WEBPACK Generating ...
ERROR #98124 WEBPACK Generating development SSR bundle failed Can't resolve 'prop-types' in '/Users/.../gatsby-storyblok-project/node_modules/ ...
Read more >
Gatsby Deployment Fails - Netlify Support Forums
I'm trying to deploy a Gatsby v3 app running on Node 14.19.0. ... PM: error Generating SSR bundle failed 9:00:19 PM: ENOENT: no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found