-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build doesn't work as expected #8583
Comments
If i delete the |
@AlexandreBourdeaudhui can you provide a reproduction repo for this? That would make it much simpler to diagnose this issue. |
Hello @kakadiadarpan 👋. Thanks for your response !
|
The build is failing on this line: |
Hello @helmutgranda 👋 If i'm switching |
Sorry @AlexandreBourdeaudhui, I meant to say that the build is failing from the repo you shared on that line because it is looking for that config file. |
Oh ok ! But you can comment this line, it was an oversight. |
Great, commenting the line works. After doing a little bit of research it is not an issue with Gatsby but rather it is a compatibility issue: node-fetch/node-fetch#493 (comment) I submitted the code change that allows the build to run: Here is the output:
|
Thank you sir @helmutgranda 🙏 ! That works fine now ! 😱 I'm going to update my main repo with your solution and i'm going to follow the thread to know when the compatibility issue will be solved. |
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
Hello 👋 I reopen this issue, after update Gatsby's packages ; still have issues with the build and Webpack 😖... ~/Desktop/GatsbyReproduce on master [!] is 📦 v1.0.0 via ⬢ v8.12.0 took 54s
•100% ➜ gatsby info --clipboard
System:
OS: macOS 10.14.1
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
Yarn: 1.12.1 - ~/.yarn/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
Browsers:
Firefox: 63.0.1
Safari: 12.0.1
npmPackages:
gatsby: ^2.0.9 => 2.0.60
gatsby-plugin-google-analytics: ^2.0.6 => 2.0.8
gatsby-plugin-manifest: ^2.0.4 => 2.0.11
gatsby-plugin-offline: ^2.0.5 => 2.0.18
gatsby-plugin-react-helmet: ^3.0.0 => 3.0.4
gatsby-plugin-sharp: ^2.0.5 => 2.0.14
gatsby-plugin-sitemap: ^2.0.1 => 2.0.3
gatsby-remark-copy-linked-files: ^2.0.5 => 2.0.7
gatsby-remark-images: ^2.0.3 => 2.0.6
gatsby-remark-prismjs: ^3.0.1 => 3.1.2
gatsby-remark-smartypants: ^2.0.5 => 2.0.7
gatsby-source-filesystem: ^2.0.1 => 2.0.10
gatsby-transformer-remark: ^2.1.4 => 2.1.15
npmGlobalPackages:
gatsby-cli: 2.4.1 ——— ~/Desktop/GatsbyReproduce on master [!] is 📦 v1.0.0 via ⬢ v8.12.0 took 43s
•100% ➜ yarn build
yarn run v1.12.1
$ gatsby build
success open and validate gatsby-configs — 0.072 s
success load plugins — 0.194 s
success onPreInit — 0.703 s
success delete html and css files from previous builds — 0.006 s
success initialize cache — 0.008 s
success copy gatsby files — 0.074 s
success onPreBootstrap — 0.009 s
success source and transform nodes — 0.097 s
success building schema — 0.464 s
success createPages — 0.044 s
success createPagesStatefully — 0.034 s
success onPreExtractQueries — 0.001 s
success update schema — 0.143 s
success extract queries from components — 0.051 s
success run graphql queries — 0.332 s — 7/7 21.20 queries/second
success write out page data — 0.005 s
success write out redirect data — 0.001 s
Generating image thumbnails [==============================] 6/6 0.1 secs 100%
info bootstrap finished - 4.725 s
success onPostBootstrap — 0.002 s
success Building production JavaScript and CSS bundles — 3.849 s
error Building static HTML for pages failed
See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
67 | __webpack_require__.n = function(module) {
68 | var getter = module && module.__esModule ?
> 69 | function getDefault() { return module['default']; } :
| ^
70 | function getModuleExports() { return module; };
71 | __webpack_require__.d(getter, 'a', getter);
72 | return getter;
WebpackError: /Users/alexandrebourdeaudhui/Desktop/GatsbyReproduce/public/render-page.js:13519
- bootstrap:69 createScript
lib/webpack/bootstrap:69:1
- api-runner-ssr.js:19 Object.runInThisContext
lib/.cache/api-runner-ssr.js:19:1
- static-entry.js:27 Object.Module._extensions..js
lib/.cache/static-entry.js:27:1
- public-page-renderer.js:1 Module.load
lib/.cache/public-page-renderer.js:1:1
- gatsby-browser-entry.js:33 tryModuleLoad
lib/.cache/gatsby-browser-entry.js:33:9
- gatsby-browser-entry.js:22 Function.Module._load
lib/.cache/gatsby-browser-entry.js:22:9
- bootstrap:21 Promise
lib/webpack/bootstrap:21:1
- gatsby-browser-entry.js:1 Promise._resolveFromExecutor
lib/.cache/gatsby-browser-entry.js:1:1
- bootstrap:68 new Promise
lib/webpack/bootstrap:68:1
- bootstrap:5 tryCatcher
lib/webpack/bootstrap:5:1
- bootstrap:50 MappingPromiseArray._promiseFulfilled
lib/webpack/bootstrap:50:1 After search, i have this issue since |
I see the changelog and see this commit : 8061e3b, in particular 8061e3b#diff-c4777e791f64fbb6c82255341b381dab. I downloaded the version With the ⠁ { pluginX:
{ 'process.env':
{ NODE_ENV: '"production"',
PUBLIC_DIR: '"/Users/alexandrebourdeaudhui/Desktop/GatsbyReproduce/public"',
BUILD_STAGE: '"build-javascript"',
GATSBY_BUILD_STAGE: '"build-javascript"' },
__PATH_PREFIX__: '""' } }
success Building production JavaScript and CSS bundles — 3.988 s
⠁ { pluginX:
{ 'process.env':
{ NODE_ENV: '"production"',
PUBLIC_DIR: '"/Users/alexandrebourdeaudhui/Desktop/GatsbyReproduce/public"',
BUILD_STAGE: '"build-html"',
GATSBY_BUILD_STAGE: '"build-html"' },
__PATH_PREFIX__: '""' } } And all run as expected. Btw, in the source code, apply the change of version ⠁ { pluginX:
{ 'process.env': '{}',
'process.env.NODE_ENV': '"production"',
'process.env.PUBLIC_DIR': '"/Users/alexandrebourdeaudhui/Desktop/GatsbyReproduce/public"',
'process.env.BUILD_STAGE': '"build-javascript"',
'process.env.GATSBY_BUILD_STAGE': '"build-javascript"',
__PATH_PREFIX__: '""' } }
success Building production JavaScript and CSS bundles — 3.481 s
⠁ { pluginX:
{ 'process.env': '{}',
'process.env.NODE_ENV': '"production"',
'process.env.PUBLIC_DIR': '"/Users/alexandrebourdeaudhui/Desktop/GatsbyReproduce/public"',
'process.env.BUILD_STAGE': '"build-html"',
'process.env.GATSBY_BUILD_STAGE': '"build-html"',
__PATH_PREFIX__: '""' } } And my build is failing 😖 Maybe something had change for the build and i dont see ? 🚶 |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
Description
Sorry for the title, but i don't have any idea... Can not build my Gatsby app. When i'm using
gatsby build
, i got an error.Steps to reproduce
gatsby build
🤷♂️... I'm not sure, but if i comment the line of'@octokit/rest'
import in my code, i can build correctly... I clear.cache
&&public
folder, clear thenode_modules
, update my dependencies, and the issue is always here.Actual result
Environment
The text was updated successfully, but these errors were encountered: