You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Gatsby to build a documentation site for an internal component library. To make things easier I added the react-element-to-jsx-string so that our examples could automatically be rendered and displayed as JSX. However I am getting this error when running build.
npm run build
> gatsby-starter-default@1.0.0 build /Users/***/docs
> gatsby build --prefix-paths
success delete html files from previous builds — 0.018 s
success open and validate gatsby-config.js — 0.004 s
success copy gatsby files — 0.040 s
success onPreBootstrap — 0.008 s
success source and transform nodes — 0.025 s
success building schema — 0.138 s
success createLayouts — 0.039 s
success createPages — 0.003 s
success createPagesStatefully — 0.052 s
success onPreExtractQueries — 0.001 s
success update schema — 0.088 s
success extract queries from components — 0.025 s
success run graphql queries — 0.005 s
success write out page data — 0.004 s
success write out redirect data — 0.005 s
success onPostBootstrap — 0.001 s
info bootstrap finished - 1.859 s
success Building CSS — 5.261 s
success Building production JavaScript bundles — 9.477 s
error Building static HTML for pages failed
See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
14 | };
15 | function webpackContextResolve(req) {
> 16 | return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());
| ^
17 | };
18 | webpackContext.keys = function webpackContextKeys() {
19 | return Object.keys(map);
WebpackError: Cannot find module '/package.json'.
- .*$:16
~/sortobject ^/.//.*$:16:34
- .*$:16 webpackContextResolve
~/sortobject ^/.//.*$:16:89
- .*$:13 webpackContext
~/sortobject ^/.//.*$:13:1
- index.js:200 Object.requirePackage
~/editions/es2015/index.js:200:1
- index.js:3 Object.<anonymous>
~/sortobject/index.js:3:1
- formatComplexDataStructure.js:17 Object.module.exports
~/react-element-to-jsx-string/dist/formatter/formatComplexDataStructure.js:17:1
- formatPropValue.js:15 Object.<anonymous>
~/react-element-to-jsx-string/dist/formatter/formatPropValue.js:15:1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-default@1.0.0 build: `gatsby build --prefix-paths`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gatsby-starter-default@1.0.0 build 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/***/.npm/_logs/2017-11-15T00_59_42_163Z-debug.log
After digging through the code I have found that the issue seems to be with the editions package not being compatible with the HTML build tools but I wasn't able to figure out why.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues as many of them have already been resolved with the latest updates or explained in a previous issue.
Feel free to open a new one if you still experience this problem or a similar one! 👍
I am using Gatsby to build a documentation site for an internal component library. To make things easier I added the
react-element-to-jsx-string
so that our examples could automatically be rendered and displayed as JSX. However I am getting this error when running build.After digging through the code I have found that the issue seems to be with the
editions
package not being compatible with the HTML build tools but I wasn't able to figure out why.OS: macOS Sierra 10.12.6
Node: 8.1.4
NPM: 5.5.1
gatsby: 1.9.102
react-element-to-jsx-string: 13.0.0
The text was updated successfully, but these errors were encountered: