Skip to content

WASI not working on Windows #31461

Description

@RReverser
  • Version: 13.7.0
  • Platform: Windows 10 1903 x64
  • Subsystem: wasi

WASI preopen option fails on Windows, but works on Linux (including Linux subsystem on Windows in the same dir).

In the simplest case, to reproduce the issue open REPL with node --experimental-wasi-unstable-preview1 in any directory and try to construct a WASI object:

> process.cwd()
'C:\\Users\\rreverser\\Projects'
> const {WASI} = require('wasi')
undefined
> (node:18424) ExperimentalWarning: WASI is an experimental feature. This feature could change at any time

> new WASI({ env: {}, args: [], preopens: { '/sandbox': process.cwd() } })
Uncaught Error: UVWASI_EISDIR, uvwasi_init
    at new WASI (wasi.js:59:18) {
  errno: 31,
  code: 'UVWASI_EISDIR',
  syscall: 'uvwasi_init'
}

Same error can be seen in a real code, too.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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