Skip to content
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

Webassembly Error When Building #14891

Closed
Talii123 opened this issue Jun 19, 2019 · 8 comments
Closed

Webassembly Error When Building #14891

Talii123 opened this issue Jun 19, 2019 · 8 comments

Comments

@Talii123
Copy link

Description

When I run gatsby develop the server fails to start due to an error with WebAssembly.
Interestingly, npm run develop works as expected.

Steps to reproduce

Just follow the steps from the Quick Start Tutorial.

Expected result

The development server should start (as it does when you run npm run develop).

Actual result

$ gatsby develop
success open and validate gatsby-configs — 0.010
success load plugins — 1.665
success onPreInit — 0.007
success initialize cache — 0.012
success copy gatsby files — 0.134
success onPreBootstrap — 0.028
success source and transform nodes — 0.275
success building schema — 0.741
success createPages — 0.002
success createPagesStatefully — 0.105
success onPreExtractQueries — 0.012
success update schema — 0.066
success extract queries from components — 0.302
success write out requires — 0.010
success write out redirect data — 0.010
success Build manifest and related icons — 0.194
success onPostBootstrap — 0.198

info bootstrap finished - 14.380 s

success run static queries — 0.328 — 3/3 9.20 queries/second
success run page queries — 0.019 — 5/5 271.42 queries/second
error UNHANDLED REJECTION

ReferenceError: WebAssembly is not defined

  • wasm.js:26 readWasm.then.buffer
    [gatsby-site]/[react-hot-loader]/[source-map]/lib/wasm.js:26:14

Environment

$ gatsby info --clipboard

System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Binaries:
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 2.7.15 - /c/Users/[myUserDir]/.windows-build-tools/python27/python
Browsers:
Edge: 44.17763.1.0
npmPackages:
gatsby: ^2.9.6 => 2.9.6
gatsby-image: ^2.1.4 => 2.1.4
gatsby-plugin-manifest: ^2.1.1 => 2.1.1
gatsby-plugin-offline: ^2.1.3 => 2.1.3
gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
gatsby-plugin-sharp: ^2.1.6 => 2.1.6
gatsby-source-filesystem: ^2.0.40 => 2.0.40
gatsby-transformer-sharp: ^2.1.21 => 2.1.21

@Talii123
Copy link
Author

Talii123 commented Jun 19, 2019

Possibly related to #13641 but slightly different error generated in wasm.js

@Aswinpookkatt
Copy link
Contributor

The WebAssembly support is added in NodeJs 8.0.0. Update your NodeJS to make it work.

@Talii123
Copy link
Author

Talii123 commented Jun 28, 2019 via email

@Talii123
Copy link
Author

Talii123 commented Jul 4, 2019

I've resolved it. Thanks.

@Talii123 Talii123 closed this as completed Jul 4, 2019
@elimisteve
Copy link

@Talii123 How'd you solve it? I'm also using Node v10.x but see the WebAssembly error. Thanks!

@Talii123
Copy link
Author

@elimisteve if I remember correctly, I actually had 2 different installations of node on my Windows machine. Not versions, I had installed it in two different places. So node -v told me about the 10.x installation but gatsby was picking up an 8.x version from a different path.

I believe I upgraded the version that gatsby was calling and uninstalled the other one.

@elimisteve
Copy link

@Talii123 Thanks!

@Talii123
Copy link
Author

Talii123 commented Apr 22, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants