Sorikairo
Sorikairo
DDeno
Created by Sorikairo on 4/28/2023 in #help
PhpStorm not resolving local import with import_map.json
2 replies
DDeno
Created by Sorikairo on 12/11/2022 in #help
[Fixed] Package cannot read a file from itself when loaded from url
I have a package A, which has to read an html file located at the package's root, such as the following file tree exists : --- mod.ts --- swagger.html Locally it works, but as soon as I load it into Package B from deno.land/x/ it cannot find the swagger.html file. I tried reading it using either a relative path ./swagger.html or
const __dirname = path.dirname(path.fromFileUrl(import.meta.url));
const filePath = `${__dirname}/swagger.html`;
const swaggerHtml = await Deno.readTextFile(filePath);
const __dirname = path.dirname(path.fromFileUrl(import.meta.url));
const filePath = `${__dirname}/swagger.html`;
const swaggerHtml = await Deno.readTextFile(filePath);
Any clue on how to make it works ?
4 replies
DDeno
Created by Sorikairo on 10/23/2022 in #help
Deno bundle duplicating variables
Using Deno 1.26.2 I am trying to bundle https://github.com/Savory/Danet-Starter using deno bundle run.ts standalone-starter.js However, the generated standalone-starter.js contains duplicated variable declaration, resulting in error: Uncaught SyntaxError: Identifier 'mod' has already been declared while trying to use deno run standalone-starter.js. Did I do something wrong or is it a bug ?
7 replies