Giter Site home page Giter Site logo

Comments (16)

ArtemGovorov avatar ArtemGovorov commented on June 8, 2024 10

There's a plan to make it work with application launched directly as node file_name.js.

from console-ninja.

jaydeepkarena avatar jaydeepkarena commented on June 8, 2024 4

Yes, i am looking for the same.

from console-ninja.

patroza avatar patroza commented on June 8, 2024 2

There's a plan to make it work with application launched directly as node file_name.js.

this would be great. having it all centrally integrated with the editor is a cool unified experience.

from console-ninja.

ArtemGovorov avatar ArtemGovorov commented on June 8, 2024 2

@patroza We are working on it, however no ETA to share yet.

from console-ninja.

NikGovorov avatar NikGovorov commented on June 8, 2024 2

Hi guys,

Today, we are happy to announce the release of support for node app.js-like workflows. Please refer to Universal Node applications section of our docs for more information.

from console-ninja.

tarwich avatar tarwich commented on June 8, 2024 2

Thanks for the response! Updating the docs would help!

I don't like tools to touch my .profile without permission. Plus I am using fishshell, so it wouldn't have helped. I switched to bash for troubleshooting purposes. It would be nice if this were a setting, or something (even if it were defaulted to true). Perhaps instead of a setting, a command? I'll let y'all worry about that. Just wanted to weigh in.

Love you guys!

from console-ninja.

MateoCerquetella avatar MateoCerquetella commented on June 8, 2024

Same for me!

from console-ninja.

omerson-cruz avatar omerson-cruz commented on June 8, 2024

Yes, this would be great feature too :)

from console-ninja.

patroza avatar patroza commented on June 8, 2024

There's a plan to make it work with application launched directly as node file_name.js.

how's that going @ArtemGovorov ? we could really use this atm.

from console-ninja.

suryarajendhran avatar suryarajendhran commented on June 8, 2024

Adding a comment here so the team knows that there's a lot of demand for this feature!

from console-ninja.

tarwich avatar tarwich commented on June 8, 2024

Apologies for the necro, but I tried using this a little last week, and couldn't get it to work.

❯ console-ninja node test.js
fish: Unknown command: console-ninja
bash-3.2$ console-ninja node test.js
bash: console-ninja: command not found

I've tried

  • Running as a task
  • Running as a shell command
  • Running console-ninja
  • Running /Users/.../.vscode/extensions/wallabyjs.console-ninja-0.0.91/out/shell/console-ninja
  • Uninstalling and reinstalling
  • Resetting all settings

Can't figure out how this is supposed to be working.

node: 14.21.2
Operating System:
  darwin: 22.3.0
  arch: x64

from console-ninja.

patroza avatar patroza commented on June 8, 2024

@tarwich
so the extension in vscode has installed console-ninja to my bin:
~/.local/bin/console-ninja

don't know if you need a more recent node.

from console-ninja.

tarwich avatar tarwich commented on June 8, 2024

Thanks @patroza that's definitely what I suspected. I don't have that file.

❯ ls -la1 ~/.local
./
../
share/
state/

I've uninstalled, rebooted, installed the extension. Will continue to google. If you're comfortable sharing, what's the contents of your ~/.localbin/console-ninja file? I have this:

❯ cat ~/.vscode/extensions/wallabyjs.console-ninja-0.0.91/out/shell/console-ninja
#!/bin/sh
export NODE_OPTIONS='--no-warnings --loader "<REPLACE>"';
$@
❯ ls -l1 ~/.vscode/**/console-ninja
~/.vscode/extensions/wallabyjs.console-ninja-0.0.91/out/shell/console-ninja

from console-ninja.

tarwich avatar tarwich commented on June 8, 2024

Found something useful in the log...

info host creating /Users/.../.console-ninja/.bin
info host installing /Users/.../.console-ninja/.bin/loader.js
info host installing /Users/.../.console-ninja/.bin/console-ninja
info host installing /usr/local/bin/console-ninja
ERR! host failed to create symbolic link EACCES: permission denied, symlink '/Users/.../.console-ninja/.bin/console-ninja' -> '/usr/local/bin/console-ninja'

Continuing looking for data...

❯ ls -la1 ~/.console-ninja/.bin
./
../
console-ninja*
loader.js
Experiment 1 (fail)

Trying this:

 ~/.console-ninja/.bin/console-ninja npm run dev

didn't work.

Let console ninja make the .local/bin stuff...

mkdir -p ~/.local/bin
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile

Restart vscode...

❯ ls -la1 ~/.local/bin
./
../
console-ninja@

Ok... better...

Experiment 2 (fail)

test.js

console.log('test');
new Promise(resolve => { setTimeout(resolve, 5000); })
.then(() => console.log('done'));
❯ console-ninja node test.js
test
done

image

Still not working, but progress was made

from console-ninja.

tarwich avatar tarwich commented on June 8, 2024

Ok. Updated my node to @16 and it connected.

from console-ninja.

NikGovorov avatar NikGovorov commented on June 8, 2024

Thanks for sharing the details, we'll change the installation process to include shell profile scripts change (prepending to PATH variables) and mention the min version of nodejs in our docs.

from console-ninja.

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.