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

Fail to compile wasm locally #465

Open
@wangtz

Description

@wangtz

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions