MrKleeblatt
MrKleeblatt
DDeno
Created by MrKleeblatt on 6/19/2023 in #help
Error reading `allocUnsafe` using npm:ics
Hello there, I try to use npm:ics in my project and in some runs it works, in others it doesn't (which is pretty weird if you think about it) and I get the following error:
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'allocUnsafe')
at fillPool (file:///home/***/.cache/deno/npm/registry.npmjs.org/nanoid/3.3.6/index.cjs:7:19)
at nanoid (file:///home/***/.cache/deno/npm/registry.npmjs.org/nanoid/3.3.6/index.cjs:38:3)
at Object.<anonymous> (file:///home/***/.cache/deno/npm/registry.npmjs.org/ics/3.2.0/dist/defaults.js:13:27)
at Object.<anonymous> (file:///home/***/.cache/deno/npm/registry.npmjs.org/ics/3.2.0/dist/defaults.js:19:4)
at Module._compile (ext:deno_node/01_require.js:974:34)
at Object.Module._extensions..js (ext:deno_node/01_require.js:1007:10)
at Module.load (ext:deno_node/01_require.js:885:32)
at Function.Module._load (ext:deno_node/01_require.js:719:12)
at Module.require (ext:deno_node/01_require.js:907:19)
at require (ext:deno_node/01_require.js:1047:16)
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'allocUnsafe')
at fillPool (file:///home/***/.cache/deno/npm/registry.npmjs.org/nanoid/3.3.6/index.cjs:7:19)
at nanoid (file:///home/***/.cache/deno/npm/registry.npmjs.org/nanoid/3.3.6/index.cjs:38:3)
at Object.<anonymous> (file:///home/***/.cache/deno/npm/registry.npmjs.org/ics/3.2.0/dist/defaults.js:13:27)
at Object.<anonymous> (file:///home/***/.cache/deno/npm/registry.npmjs.org/ics/3.2.0/dist/defaults.js:19:4)
at Module._compile (ext:deno_node/01_require.js:974:34)
at Object.Module._extensions..js (ext:deno_node/01_require.js:1007:10)
at Module.load (ext:deno_node/01_require.js:885:32)
at Function.Module._load (ext:deno_node/01_require.js:719:12)
at Module.require (ext:deno_node/01_require.js:907:19)
at require (ext:deno_node/01_require.js:1047:16)
Can I fix this or does it have to do something with npm support of Deno?
1 replies
DDeno
Created by MrKleeblatt on 5/9/2023 in #help
`await import()` without global execution
Hello there. This is some code from my test.ts:
// test.ts
console.log("Hello World");
export const say_hi = ()=>console.log("hi");
// test.ts
console.log("Hello World");
export const say_hi = ()=>console.log("hi");
When I import test.ts via
// main.ts
const mod = await import("test.ts");
// main.ts
const mod = await import("test.ts");
the code inside test.ts will be executed and I get Hello World to the console. Is it possible that I import only exported code from test.ts and do not run any of it intrinsically?
5 replies