Comments (7)
thanks for the report, i confirmed that problem, i try to fix it asap
from trex.
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.
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.
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.
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.
from trex.
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.
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/
ortrex run test
aliasing the same command - Run
trex install
- Repeat
Is it a bug or I miss-configured something?
from trex.
Related Issues (20)
- Ability to pin dependencies to latest version without knowing the specific version number HOT 4
- Trex check cannot handle local alias HOT 4
- Feature request – Allow specifying a custom output file name for the import map (e.g. import-map.json) HOT 3
- trex check incorrect latest version HOT 5
- all trex commands ruins HOT 1
- Trex run scripts crash within GitHub Actions
- Make `--map` the default behaviour HOT 1
- Provide a Unique Selling Proposition for trex comparing it with Deno's new task runner HOT 1
- Merge run.json into import_map.json HOT 3
- Standard library and third-party modules have the same name HOT 2
- Bad resource ID using the postinstall script HOT 1
- Add NPM support, please HOT 3
- NotFound: No such file or directory HOT 5
- trex delete doesnt delete all the packages in import_map.json HOT 4
- V2 Roadmap
- A command to cache all dependencies HOT 4
- run` trex i --map oak` failed ? HOT 1
- run ` trex --custom React=https://dev.jspm.io/react/index.js` failed? HOT 1
- When I install a library that depends on its own importmap, 'trex tree' won't find its dependencies. I need to merge its importmap into my importmap to work.
- Support `deps.ts` (or drop replacement for `import_map.json`)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trex.