Comments (7)
Same here 😢
from scripty.
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.
@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.
@sanketphansekar followed those instructions, however what if the script is type #!/usr/bin/env node
?
from scripty.
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.
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.
from scripty.
Any news?
from scripty.
Related Issues (20)
- The scripty.path config is not work. HOT 2
- Bug while sharing scripts via node modules HOT 3
- Update dependency to remove vulnerability. HOT 2
- Scripts Path Not Read With Yarn 3
- PNPM Support HOT 3
- monorepo single config HOT 2
- In MAC, may be unenforceable directory, how can do before running scripts, automatically run chmod + x scripts/path/to/my/script HOT 7
- scripty ERR! It seems you may be running scripty from the command-line directly HOT 1
- pnpm build error, unknown options: 'commitizen_path', 'scripty_path', 'scripty_windowsPath' #
- Scripts fail with Node.js v >=18 HOT 3
- Revive builtIn scripts resolver HOT 2
- Batch scripts skip directories HOT 1
- Sharable scripts via a npm package HOT 3
- Default to silent mode; allow verbose option HOT 1
- multiple script locations HOT 6
- Allow directly running using "scripty <target>" HOT 8
- npm proposal for proxying "npm run"
- Script name and content is always printed HOT 3
- Options won't work with npm >= 7 HOT 7
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 scripty.