NPM scripts don't work on windows os
See original GitHub issueDescribe the bug NPM scripts are not compatible on a windows scripts for two reasons:
- Use of single quotes
- Setting of environment variables
These have both been mitigated in my PR that I will submit. That said, I’m not sure if this is a complete fix as npm run test
keeps failing due to an error with XMLHttpRequest regarding the tests involving DataFrame.fromXXXX
. The error I get is below.
At the same time, I feel that this might not be related to the issue at hand, because when I remove the offending lines, the tests (and all other scripts) work just fine. This might just be an issue with my machine. Let me know your thoughts.
Unhandled rejection in tests\dataframeIO.test.js
C:\Users\mkupfer\dataframe-js\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:299
Error: Protocol not supported.
Desktop (please complete the following information):
- OS: Windows 7 Professional
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
npm run-script doesn't work on windows when the ... - GitHub
A bash script won't work on Windows, for obvious reasons. Write a node program, or better yet, just don't use an install command....
Read more >npm run scripts does not working - node.js - Stack Overflow
js and trying making the scripts in package. json file to be working. Then I either trying run npm test or npm start...
Read more >scripts | npm Docs
As of npm@7 these scripts run in the background. To see the output, run with: --foreground-scripts . prepublish (DEPRECATED). Does not run during...
Read more >Running cross-platform tasks via npm package scripts - 2ality
The npm package manager lets us define small shell scripts for tasks and execute them via npm run. In this blog post, we...
Read more >npm start not working in vs code terminal - You.com
Or in search settings type 'default profile', and select Command Prompt. Install VS Code extension - npm script runner (npm support for VS...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Gmousse I figured out the final piece to the puzzle! The reason that the XMLHttpRequest error was because the protocol
file://
was not being added for windows paths. Adding thepath.startsWith("C")
to file protocol will finally put this issue to rest 🙌Your PR #83 is now merged on develop.
It will be included in the next release.