gridsome: gridsome build 0.5.0 throws error, 0.5.8 does not

Description

If I build my project with gridsome build where grisome has the version 0.5.0 I receive an error message, if I build the same project with gridsome version 0.5.8 the build process is frozen after the Compile assets step.

Expected result

The error message should occur in both versions.

Actual result

The error message in the 0.5.0 build is:

Gridsome v0.5.0

Initialize - 1.24s
Load sources - 0.24s
Create GraphQL schema - 0.26s
Set up routes - 0s
Generate code - 0.02s
Bootstrap finish - 1.76s
Run GraphQL (32 queries) - 0.14s
Compile assets - 21.75s
Failed to render /mein-better-hr/self-checks
ReferenceError: self is not defined
    at Object.<anonymous> (node_modules/whatwg-fetch/fetch.js:2:0)
    at __webpack_require__ (webpack/bootstrap:19:0)
    at Module.<anonymous> (assets/js/app.123f8d61.js:5127:84)
    at __webpack_require__ (webpack/bootstrap:19:0)
    at Module.<anonymous> (assets/js/app.123f8d61.js:78078:21)
    at __webpack_require__ (webpack/bootstrap:19:0)
    at Module.<anonymous> (src/.temp/routes.js:17:34)
    at __webpack_require__ (webpack/bootstrap:19:0)
    at Object.<anonymous> (assets/js/app.123f8d61.js:67520:18)
    at __webpack_require__ (webpack/bootstrap:19:0)

In gridsome 0.5.8 the build process is frozen:

Gridsome v0.5.8

Initialize - 1.24s
Load sources - 0.22s
Create GraphQL schema - 0.3s
Set up routes - 0s
Generate code - 0.02s
Bootstrap finish - 1.79s
Run GraphQL (32 queries) - 0.13s
Compile assets - 13.75s

Environment


Libs:
- gridsome version:0.5.0 and 0.5.8
- @gridsome/cli version: 0.0.9
 
For Tooling issues:
- Node version: 11.15.0
- Platform:  MacOS 10.14.4

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 23 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@havardl , @tbredin Try run it inside <ClientOnly> component or in mounted()

@hjvedvik Sorry, this week I have no time … Hopefully on next weekend 😉