Giter Club home page Giter Club logo

Comments (7)

GiancarlosIO avatar GiancarlosIO commented on July 4, 2024

Same here 😢

from scripty.

magnus-bb avatar magnus-bb commented on July 4, 2024

Same here. Have tried clearing NPM cache and clearing out node_modules. Scripty exclaims that it can find the script and tries to execute it. The script is executable and works when run directly with bash.

from scripty.

sanketphansekar avatar sanketphansekar commented on July 4, 2024

@vsawant1608 I feel the mistake might be in creating the script file, it should be with extension .cmd

As per documentation : In order to add Windows support, you could define scripts-win/script.cmd

For more details on windows support you can read it here

from scripty.

dealvz avatar dealvz commented on July 4, 2024

@sanketphansekar followed those instructions, however what if the script is type #!/usr/bin/env node ?

from scripty.

jonrcrowell avatar jonrcrowell commented on July 4, 2024

I was having the same issue regardless of how I configured the shebang. (node, cmd, pwsh, bash, whatever)
I also deleted node_modules, any .lock files I had, and re-ran yarn.

I was able to get it to work by running wsl from the terminal, then running my scripty script. I have both a /scripts folder and a /scripts-win folder. The version that gets called from the wsl prompt is the /scripts version, which I actually prefer so that I don't have to maintain two sets of scripts.

Unfortunately using wsl only gets past the initial events.js // Unhandled 'error'. My initial test script just had a console.log statement in it. When I added something that I actually want the script to do, it failed.

Changing my node scripts to .cmd files resolved all errors, but left me stuck with re-writing my scripts, which at this point isn't worth the trouble. I want to use JavaScript.

Issues like this make me seriously consider switching to a Mac for good.

from scripty.

vsawant1608 avatar vsawant1608 commented on July 4, 2024

Just a hack for this would be to update file in node_modules to use cross_spawn(https://www.npmjs.com/package/cross-spawn). It makes most of the things work fine on windows without any issues.

image

from scripty.

andredezzy avatar andredezzy commented on July 4, 2024

Any news?

from scripty.

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.