Coder Social home page Coder Social logo

Error "error: Uncaught SyntaxError: The requested module 'https://deno.land/std/io/mod.ts' does not provide an export named " after building tg file about tg-cli HOT 7 CLOSED

csallen1204 avatar csallen1204 commented on August 24, 2024
Error "error: Uncaught SyntaxError: The requested module 'https://deno.land/std/io/mod.ts' does not provide an export named " after building tg file

from tg-cli.

Comments (7)

chenbishop avatar chenbishop commented on August 24, 2024

Hi @csallen1204

I suspect the issue is caused by the command used for compiling is not correct.

If you are compiling cli to be used in linux please use the following commands

deno cache --reload ./tg.js --unstable
deno bundle --unstable --import-map ./import_map.json ./tg.js ./tg.bundle.js
deno compile --allow-all --unstable --target x86_64-unknown-linux-gnu --output ./tg ./tg.bundle.js &

Please let me know if this works.

from tg-cli.

csallen1204 avatar csallen1204 commented on August 24, 2024

That got me past that error but got me to a new one:

ascii@thinkpad-x1:~/git-repo/tg-cli$ ./tg export
 ? Enter Twingate account: › [ERROR]   Exception: TypeError: Deno.setRaw is not a function
    at Input.#readChar (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6179:18)
    at Input.#readKey (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6172:42)
    at Input.read (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6121:47)
    at Input.#execute (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6072:25)
    at async Input.prompt (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6058:20)
    at async PromptList.runPrompt (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7380:45)
    at async file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7312:17
    at async PromptList.runBeforeHook (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7368:9)
    at async PromptList.next (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7310:13)
    at async PromptList.run (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7305:9)

I tested both the master and development branches and got the same thing.

from tg-cli.

chenbishop avatar chenbishop commented on August 24, 2024

this has just been fixed in master branch(1 hour ago), could you pull the latest code and try again please?

from tg-cli.

csallen1204 avatar csallen1204 commented on August 24, 2024

Same error:

ascii@thinkpad-x1:~/git-repo/tg-cli$ git pull
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 3), reused 6 (delta 3), pack-reused 0
Unpacking objects: 100% (6/6), 913 bytes | 76.00 KiB/s, done.
From https://github.com/Twingate-Labs/tg-cli
   4061309..d7c8611  main       -> origin/main
 * [new tag]         v0.0.56    -> v0.0.56
 * [new tag]         v0.0.55    -> v0.0.55
Updating 4061309..d7c8611
Fast-forward
 TwingateApiClient.mjs | 2 +-
 import_map.json       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
ascii@thinkpad-x1:~/git-repo/tg-cli$ deno compile --allow-all --unstable --target x86_64-unknown-linux-gnu --output ./tg ./tg.bundle.js &
[1] 28930
ascii@thinkpad-x1:~/git-repo/tg-cli$ Compile file:///home/ascii/git-repo/tg-cli/tg.bundle.js
Archive:  /tmp/.tmpushH0o/deno.zip
  inflating: deno                    
Emit ./tg

[1]+  Done                    deno compile --allow-all --unstable --target x86_64-unknown-linux-gnu --output ./tg ./tg.bundle.js
ascii@thinkpad-x1:~/git-repo/tg-cli$ ./tg export
 ? Enter Twingate account: › [ERROR]   Exception: TypeError: Deno.setRaw is not a function
    at Input.#readChar (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6179:18)
    at Input.#readKey (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6172:42)
    at Input.read (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6121:47)
    at Input.#execute (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6072:25)
    at async Input.prompt (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:6058:20)
    at async PromptList.runPrompt (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7380:45)
    at async file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7312:17
    at async PromptList.runBeforeHook (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7368:9)
    at async PromptList.next (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7310:13)
    at async PromptList.run (file:///home/ascii/git-repo/tg-cli/tg.bundle.js:7305:9)
ascii@thinkpad-x1:~/git-repo/tg-cli$ 

from tg-cli.

chenbishop avatar chenbishop commented on August 24, 2024

I suspect this is caused by the packages from import map is cached.

could you run all of the following commands

deno cache --reload ./tg.js --unstable
deno bundle --unstable --import-map ./import_map.json ./tg.js ./tg.bundle.js
deno compile --allow-all --unstable --target x86_64-unknown-linux-gnu --output ./tg ./tg.bundle.js &

from tg-cli.

csallen1204 avatar csallen1204 commented on August 24, 2024

It's working! Thanks!

from tg-cli.

chenbishop avatar chenbishop commented on August 24, 2024

Thats great!

Closing the issue.

from tg-cli.

Related Issues (10)

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.