Running a Gatsby App from node_modules - "Generating SSR bundle failed"
See original GitHub issueHello 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:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
@puzzledbytheweb thank you for your comment here - this really helped me as well. Much appreciated!
@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.