Giter Club home page Giter Club logo

Comments (7)

buttercubz avatar buttercubz commented on May 17, 2024 1

thanks for the report, i confirmed that problem, i try to fix it asap

from trex.

RivierGrullon avatar RivierGrullon commented on May 17, 2024 1

I didn't realize that you don't have the path for binaries for deno in your console, you need to add manually in linux

go to the .bashrc and write what appeared to you about exporting in the terminal

export PATH="/home/{username}/.deno/bin:$PATH"

from trex.

buttercubz avatar buttercubz commented on May 17, 2024 1

Is it a bug or I miss-configured something?

try adding --import-map flag:

deno test -A --unstable --import-map=./import_map.json scripts/

from trex.

RilDev avatar RilDev commented on May 17, 2024 1

Thanks for you help!

I just noticed it after sending the message.

And thank you as well for the great package, it's gonna make Deno development a breeze!

from trex.

RilDev avatar RilDev commented on May 17, 2024

Good day,

The last PR didn't fix my problem. I updated Trex and reopened my terminal, but it still doesn't work. Neither on Ubuntu 20, nor on Windows 10.

trex-not-found

from trex.

RivierGrullon avatar RivierGrullon commented on May 17, 2024
2021-02-09.08-44-37.mp4

We didn't make a new release but the bug was fixed, so when we make another release this will not happen meanwhile you can clone the repository and open the folder in your terminal and write

deno install -A --unstable -n -f trex --no-check ./cli.ts

from trex.

RilDev avatar RilDev commented on May 17, 2024

Thanks, adding ~/.deno/bin to my path fixed it! Sorry for the blunder.
For info, I installed Deno using cargo install deno.

trex -h returns:

advanced package management for deno, based on import_map.json

USAGE:
   trex [OPTIONS] [SUBCOMMAND]

OPTIONS:
   -h, --help      print help info
   -c, --custom    install custom package
   -v, --version   print version
   -m, --map       install package from deno.land
   -n, --nest      install package from nest.land
   -p, --pkg       install package from some repository

SUBCOMMANDS:
   [install or i]  install a package
   delete          delete a package
   upgrade         update trex
   tree            view dependency tree
   run             run a script alias in a file run.json
   setup           create a deno configuration for your IDE
   purge           remove a package or url from cache
   ls              shows the list of installed packages

you can see the different options available for each command using:
   trex  [command] --help or -h

But, I'm still having errors when I try to import modules through Trex.

Using these imports:

// scripts/plugin-name/main.ts
import {
  assert,
  assertEquals,
  assertThrowsAsync,
} from "testing/asserts.ts";
import { exists } from "fs/mod.ts";
...

deno test -A --unstable scripts/ gives me this error:

Check file:///home/rildev/Projects/olivetan/$deno$test.ts
error: TS2305 [ERROR]: Module '"deno:///missing_dependency.d.ts"' has no exported member 'assert'.
  assert,
  ~~~~~~
    at file:///home/rildev/Projects/olivetan/scripts/modernize-transcript/tests/main.test.ts:2:3

TS2305 [ERROR]: Module '"deno:///missing_dependency.d.ts"' has no exported member 'assertEquals'.
  assertEquals,
  ~~~~~~~~~~~~
    at file:///home/rildev/Projects/olivetan/scripts/modernize-transcript/tests/main.test.ts:3:3

TS2305 [ERROR]: Module '"deno:///missing_dependency.d.ts"' has no exported member 'assertThrowsAsync'.
  assertThrowsAsync,
  ~~~~~~~~~~~~~~~~~
    at file:///home/rildev/Projects/olivetan/scripts/modernize-transcript/tests/main.test.ts:4:3

TS2305 [ERROR]: Module '"deno:///missing_dependency.d.ts"' has no exported member 'exists'.
import { exists } from "fs/mod.ts";
         ~~~~~~
    at file:///home/rildev/Projects/olivetan/scripts/modernize-transcript/tests/main.test.ts:6:10

Found 4 errors.

Here is my setup:

// .vscode/settings.json
{
    "deno.enable": true,
    "deno.import_map": "./import_map.json",
    "deno.unstable": true
}
// import_map.json
{
  "imports": {
    "fs/": "https://deno.land/std/fs/",
    "testing/": "https://deno.land/std/testing/"
  }
}

Steps Followed:

  • Install dependencies with trex i -m fs testing
  • Run deno test -A --unstable scripts/ or trex run test aliasing the same command
  • Run trex install
  • Repeat

Is it a bug or I miss-configured something?

from trex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.