-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm install v8flags Still Fails on Windows #9
Comments
duplicate of #6 (no global node install, different codepaths though) |
@tkellen Problem is https://github.com/tkellen/node-v8flags/blob/master/package.json#L24 I think you can just put a .js file in there and npm will run it, I don't think you need to specify |
I hate to admit this, but the problem appears to be "operator error." I was trying to execute 'npm install' in Git Bash. Troubleshooting, I discovered even attempting to run 'node fetch.js' failed. Using the Windows command prompt instead, everything works fine. |
That is hugely helpful to know. I will run some tests to see if I can make Also yes, the caching is intentional.
|
I've been trying to debug it. IMHO problem lays in spawning child process. Maybe better solution will be catching the flags before install (as simple as "node --v8-flags > flags.temp && node fetch.js" of something similar) and run all the parsing logic on that file. It's very simple change, but you'll avoid all that child_process crazy magic 🔮 |
@tkellen LOL! Yeah, I feel that way sometimes... often. Sometimes I stop and say, "Wait! Why am I spending so much time on this?" @matma The paths in both Windows cmd and Git Bash to be the same on my machine. However, when I executed 'node fetch.js' node seemed not to understand standard keywords. For example, the 'new' keyword. If I modified 'fetch.js' to eliminate this problem, 'node' complained that I hadn't defined 'require'. It was as if 'node' couldn't parse the JavaScript correctly. Note: in the original output the caret appears beneath the "n" in "new": Desktop(master) > node fetch.js c:\Users\Nick\Desktop\fetch.js:11 |
@Techdoode I think that is normal behaviour - child_process.exec throws an error, and node is rethrowing it - there's no handler that can catch it, so it fails with that message. Caret shows the beginning of the line that throws. What is even stranger - I've got Windows 8 on virtual box, and on that machine everything works fine. However node wasn't almost use on it. So it's a "fresh" 0.10.33 installation. I'll investigate it further... |
@tkellen please take a look at matma/node-v8flags@afbce3f tested on Windows and OSX, works fine. Little less magic, if you want I can do PR at any time... |
@matma Works on my machine. :-) https://github.com/gulpjs/gulp/blob/master/bin/gulp.js#L25 As you can tell from my earlier comments, I'm new at this. So this may be a non-issue. |
@Techdoode - yeah I will look at this, unlinkSync looks like cross-platform rm :) |
@contra was #4 actually something you saw in the wild? I'm thinking of reverting if not. @matma, that looks nice! It's more or less what I had in |
@matma unlinkSync looks okay to me, if it works on Windows. However, I think we agree I basically know nothing, right? :-) |
@tkellen Why revert it? |
Because it is causing all kinds of issues for people on Windows, and because the fix being suggested by them amounts to reverting the change. Before making that decision, I want to know if your suggestion in #4 had manifest itself in reality. |
@tkellen No it was a bug I spotted when looking through the code. Since I don't use multiple node installs I have not experienced it personally, but anyone who does would definitely be bit by that. |
@tkellen Can you point me to where it was identified that the problem was there (and why)? |
Should be fixed in v8flags |
I have NodeJS version v0.10.33 installed on a Dell PC running Windows 7 Ultimate. The npm version is 1.4.28.
When I issue npm install v8flags, I receive the following output from npm:
\
npm ERR! [email protected] install:
node fetch.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8flags package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node fetch.js
npm ERR! You can get their info via:
npm ERR! npm owner ls v8flags
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\node_modules
\npm\bin\npm-cli.js" "install" "v8flags"
npm ERR! cwd c:\xampp\htdocs\responsive
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0
I first encountered the problem attempting to install Gulp. The install failed with messages similar to the above. I then attempted to npm install v8flages, with the above results.
The text was updated successfully, but these errors were encountered: