Ren Hiyama
Ren Hiyama
DDeno
Created by Ren Hiyama on 9/22/2023 in #help
Deno cannot import mainfile by reading from package.json
No description
12 replies
DDeno
Created by Ren Hiyama on 6/16/2023 in #help
Reejs not working on Deno v1.34
deno run -A npm:reejs
[INFO] Saving important data...
[TIP] If the error in your code is in any of the following extensions (.ts, .tsx, .jsx), kindly not focus on the line number as the line numbers depict the compiled code and not the original one. Add `DEBUG=true` to your environment variables to see the original code.
TypeError: Could not resolve 'node:repl' from 'file:///home/ren/.cache/deno/npm/registry.npmjs.org/@reejs/imports/2.1.13/nativeImport.js'.
Caused by:
[ERR_UNSUPPORTED_ESM_URL_SCHEME] Only file and data URLS are supported by the default ESM loader. Received protocol 'node'
at async NativeImport (file:///home/ren/.cache/deno/npm/registry.npmjs.org/@reejs/imports/2.1.13/nativeImport.js:15:25)
at async file:///home/ren/.cache/deno/npm/registry.npmjs.org/reejs/0.9.21/src/cli/cmds/repl.js:6:12 {
code: "ERR_MODULE_NOT_FOUND"
}
deno run -A npm:reejs
[INFO] Saving important data...
[TIP] If the error in your code is in any of the following extensions (.ts, .tsx, .jsx), kindly not focus on the line number as the line numbers depict the compiled code and not the original one. Add `DEBUG=true` to your environment variables to see the original code.
TypeError: Could not resolve 'node:repl' from 'file:///home/ren/.cache/deno/npm/registry.npmjs.org/@reejs/imports/2.1.13/nativeImport.js'.
Caused by:
[ERR_UNSUPPORTED_ESM_URL_SCHEME] Only file and data URLS are supported by the default ESM loader. Received protocol 'node'
at async NativeImport (file:///home/ren/.cache/deno/npm/registry.npmjs.org/@reejs/imports/2.1.13/nativeImport.js:15:25)
at async file:///home/ren/.cache/deno/npm/registry.npmjs.org/reejs/0.9.21/src/cli/cmds/repl.js:6:12 {
code: "ERR_MODULE_NOT_FOUND"
}
When will deno support node:repl ? Are there any 3rd party polyfills that let me just the same repl support like nodejs?
1 replies
DDeno
Created by Ren Hiyama on 6/1/2023 in #help
Deno showing node globalThis error
Deno is showing this error:
error: Uncaught ReferenceError: __DENO_NODE_GLOBAL_THIS_0_43_0__ is not defined
at file:///home/ren/coding/frontend/packit/node_modules/@reejs/imports/env.js:1:18
error: Uncaught ReferenceError: __DENO_NODE_GLOBAL_THIS_0_43_0__ is not defined
at file:///home/ren/coding/frontend/packit/node_modules/@reejs/imports/env.js:1:18
The mentioned file starts as this:
// learn what runtime are we using based on their differences: nodejs, deno,
// bun, or else edge
let runtime = "browser";
if (typeof Deno !== "undefined") {
runtime = "deno";
} else if (typeof Bun !== "undefined") {
runtime = "bun";
} else if (typeof process !== "undefined") {
if (process.versions.node) {
runtime = "node";
const originalEmit = process.emit;
process.emit = function(name, data, ...args) {
if (name === `warning` && typeof data === `object` &&
data.name === `ExperimentalWarning`)
return false;
//more lines of code...
// learn what runtime are we using based on their differences: nodejs, deno,
// bun, or else edge
let runtime = "browser";
if (typeof Deno !== "undefined") {
runtime = "deno";
} else if (typeof Bun !== "undefined") {
runtime = "bun";
} else if (typeof process !== "undefined") {
if (process.versions.node) {
runtime = "node";
const originalEmit = process.emit;
process.emit = function(name, data, ...args) {
if (name === `warning` && typeof data === `object` &&
data.name === `ExperimentalWarning`)
return false;
//more lines of code...
22 replies