question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NPM scripts don't work on windows os

See original GitHub issue

Describe the bug NPM scripts are not compatible on a windows scripts for two reasons:

  1. Use of single quotes
  2. 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:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mbkupfercommented, Mar 25, 2019

@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 the path.startsWith("C") to file protocol will finally put this issue to rest 🙌

0reactions
Gmoussecommented, Mar 26, 2019

Your PR #83 is now merged on develop.

It will be included in the next release.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found