Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Fail to compile wasm locally #465

Open
wangtz opened this issue Aug 11, 2020 · 1 comment
Open

Fail to compile wasm locally #465

wangtz opened this issue Aug 11, 2020 · 1 comment

Comments

@wangtz
Copy link

wangtz commented Aug 11, 2020

This site is great starting point for learning wasm. However it doesn't seem to work locally with "Download" button.

I tried gulp --require ts-node/register --gulpfile ./build.ts and got the following errors:

[08:59:33] Requiring external module ts-node/register
ReferenceError: primordials is not defined
at fs.js:35:5
at req_ (/usr/local/google/home/wangtz/projects/emcc/v3/node_modules/natives/index.js:143:24)
at Object.req [as require] (/usr/local/google/home/wangtz/projects/emcc/v3/node_modules/natives/index.js:55:10)
at Object. (/usr/local/google/home/wangtz/projects/emcc/v3/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)

Here is my tsconfig.json file (I copied it from this repo).

{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"skipLibCheck": true,
// "module": "esnext",
"moduleResolution": "node",
"target": "esnext",
"lib": ["dom", "esnext", "es2017.object"],
"jsx": "react",
"declaration": true,
"removeComments": false
},
"include": [
"./src//*",
"node_modules/monaco-editor/monaco.d.ts"
],
"exclude": [
"./templates/
/*"
]
}

Any help will be appreciated. Thanks!

@nokotan
Copy link

nokotan commented Sep 24, 2020

Related issue: Gulp 3 is broken on Node 12 #2324

Upgrading Gulp to 4 and rewriting build.ts, or Downgrading Node to v10 brings me successful build in my environment.

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

No branches or pull requests

2 participants