node_shims
node_shims copied to clipboard
TypeError: dntShim.Deno.seekSync is not a function
When trying to transpile with shims, I get the following error:
FAILURES
blocks events that post the same content too quickly
TypeError: dntShim.Deno.seekSync is not a function
at js_read (file:///home/alex/Projects/strfry-policies/npm/esm/deps/deno.land/x/[email protected]/build/vfs.js:42:26)
at wasm://wasm/0027cea2:wasm-function[84]:0x16fc
at wasm://wasm/0027cea2:wasm-function[379]:0x236f6
at wasm://wasm/0027cea2:wasm-function[373]:0x22415
at wasm://wasm/0027cea2:wasm-function[385]:0x23c12
at wasm://wasm/0027cea2:wasm-function[20]:0xf0f
at wasm://wasm/0027cea2:wasm-function[1407]:0x9311b
at file:///home/alex/Projects/strfry-policies/npm/esm/deps/deno.land/x/[email protected]/src/db.js:86:135
at setStr (file:///home/alex/Projects/strfry-policies/npm/esm/deps/deno.land/x/[email protected]/src/wasm.js:13:24)
at new DB (file:///home/alex/Projects/strfry-policies/npm/esm/deps/deno.land/x/[email protected]/src/db.js:86:24)error: Uncaught (in promise) Error: npm run test failed with exit code 1
throw new Error(
^
at runCommand (https://deno.land/x/[email protected]/lib/utils.ts:57:15)
at async build (https://deno.land/x/[email protected]/mod.ts:386:5)
at async file:///home/alex/Projects/strfry-policies/scripts/npm.ts:5:1
I looked into this briefly and it seems that Node doesn't have a way to seek from the current position or end of the file. It seems some people do it by adding native bindings (ex. https://github.com/baudehlo/node-fs-ext/blob/3125353321c30bd35fc38e40ce76ffe3872e215b/fs-ext.js#L113).
I tried to at least have seek from the start of the file, but it didn't seem to work: https://github.com/dsherret/node_deno_shims/tree/seek