question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

does not install if absolute path mappings are specified in import_map.json

See original GitHub issue

Starting with a import_map.json that has mappings for absolute paths

{
  "imports": {
    "/": "./",
    "./": "./",
  }
}
trex --custom react=https://esm.sh/react@17.0.1

results in an error:

error: Uncaught (in promise) PermissionDenied: Access is denied. (os error 5)
    const buffer = await Deno.readFile(path);
                ^
    at deno:core/core.js:86:46
    at unwrapOpResult (deno:core/core.js:106:13)
    at async open (deno:runtime/js/40_files.js:46:17)
    at async Object.readFile (deno:runtime/js/40_read_file.js:20:18)
    at async readURLContent (https://deno.land/x/trex@v1.7.0/handlers/handle_files.ts:96:17)
    at async generateHash (https://deno.land/x/trex@v1.7.0/handlers/handle_files.ts:107:14)
    at async createPackage (https://deno.land/x/trex@v1.7.0/handlers/handle_files.ts:59:52)

Removing the absolute maps solves the problem.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sant123commented, Jul 2, 2021

I’ll leave this script for someone who needs to test this feature meanwhile this PR gets merged:

deno install -Af --unstable --import-map=https://raw.githubusercontent.com/crewdevio/Trex/dev/import_map.json -n trex --no-check https://raw.githubusercontent.com/crewdevio/Trex/dev/cli.ts
1reaction
buttercubzcommented, Jul 2, 2021

Tested with v1.8.0 but getting this error with the following dependencies:

image

Sorry is it something I’m doing wrong? Please let me know.

Thanks!

hi, it seems that you are trying to verify the integrity of a path that is not a package “/”, a quick solution would be to delete the trex_storage folder that is in the .deno folder and doing a trex install again

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importmap for Rails - GitHub
Importmap for Rails. Import maps let you import JavaScript modules using logical names that map to versioned/digested files – directly from the browser....
Read more >
Import Maps | Manual - Deno
Import Maps. Deno supports import maps. You can use import maps with the --import-map=<FILE> CLI flag or importMap option in the configuration file, ......
Read more >
Import Maps Under the Hood in Rails 7 - AppSignal Blog
Learn how to install JavaScript libraries with import maps and how import maps work under the hood in Rails 7.
Read more >
How to Dynamically Import JavaScript with Import Maps
This gives you a graphical way to look through the directory, but you should not add the path to your import map since...
Read more >
Rails 7 and Import-map and loading custom JS file
Your error is because you need to fix the path. pin "@noty", to: "app/javascript/lib/noty.js", preload: true.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found