Skip to content
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

Upgrade to Node.js 0.10 #400

Closed
vojtajina opened this issue Mar 13, 2013 · 41 comments
Closed

Upgrade to Node.js 0.10 #400

vojtajina opened this issue Mar 13, 2013 · 41 comments

Comments

@vojtajina
Copy link
Contributor

THIS IS HIGH PRIORITY

If possible, we should keep compatability with 0.8

@geddski
Copy link

geddski commented Mar 14, 2013

testacular 0.5.9 breaks in Node 0.10, but 0.6.0 is fine.

@dignifiedquire
Copy link
Member

Stable is passing all tests on 0.8 and 0.10 locally. On Travis there seems to be an issue with ws. I've opened an issue websockets/ws#166.

@mbielski
Copy link

We've also had troubles with Testacular not working on 0.10 this morning and had to revert to an older version of Node. Backwards compatibility would be much appreciated.

@dignifiedquire
Copy link
Member

@mbielski What problems did you experience and what OS/Testacular version were you using?

@johnkelly
Copy link

I'm using testacular 0.6.0 with node v0.10.0 and when I run the command:

testacular init my.conf.js

It prompts for the testing framework I want to use and I can tab through them, but enter does not work and I can't proceed with configuration.

@vojtajina
Copy link
Contributor Author

I need to look into this, I would be very surprised if it just worked.

We should freeze the engine version as well. I hope we can fix it to work with 0.10 in the next canary and set engine to 0.6-0.8.

@mbielski
Copy link

We had W7-64, Node 0.10, and Testacular 0.6. It never ran, gave us some error about not being able to call a method "kill" of undefined. Sorry, I should have documented that better.

@kevinbosman
Copy link

@johnkelly Ctrl+Enter now works like pressing enter used to (only in lists of selectable options like test framework - plain text fields still accept enter)

@eriktrom
Copy link

Karma 0.8.0, Node v0.10.0, Mac 10.7 - I had the same problem as johnkelly - I ran karma init and couldn't press enter for questions asked... I did see a warning for a package upon installing karma though -- which led me to install node 0.8 -- and now karma init works fine

@geddski
Copy link

geddski commented Mar 20, 2013

Found another strange issue when running Angular e2e suite. On Node 0.10.0 / karma 0.8.0 karma hangs after running 8 tests. Doesn't matter which 8. Rollback node to 0.8.22 and karma 0.8 works again.

@vojtajina
Copy link
Contributor Author

The enter issue should be fixed by 0b5b385

@TorinFrancis
Copy link

Has to do with these changes (introduced in 0.9.9) https://github.com/joyent/node/blame/v0.10.1/lib/readline.js#L911-916

@vojtajina
Copy link
Contributor Author

@dignifiedquire can you make sure all the fixes you did (regarding 0.10 compatibility) are merged in both stable and master ?

Guys, are there any other issues with 0.10 ? Because I wanna cut both stable release (with couple of fixes) as well as canary (with the huge refactoring to plugins). So I wanna make sure these releases are already compatible with 0.10.

@geddski
Copy link

geddski commented Mar 29, 2013

Yes, our tests (Angular end2end) hang after any 8 tests run, only change is node version. Rollback to 0.8.22 and they don't hang. Anyone else seeing this?

@vojtajina
Copy link
Contributor Author

Can I see the project somewhere ?

@dignifiedquire
Copy link
Member

I have merged all changes into both branches. But I have no linux machine for testing here. On my mac everything passes.

On Fri, Mar 29, 2013 at 8:00 PM, Dave Geddes notifications@github.com
wrote:

Yes, our tests (Angular end2end) hang after any 8 tests run, only change is node version. Rollback to 0.8.22 and they don't hang. Anyone else seeing this?

Reply to this email directly or view it on GitHub:
#400 (comment)

@vojtajina
Copy link
Contributor Author

Thanks @dignifiedquire

@vojtajina
Copy link
Contributor Author

Ok, I see the issue with e2e tests. It looks like some issue with the proxy, it's delaying the requests for over a minute. I will loook into it.

@vojtajina
Copy link
Contributor Author

Updating http-proxy to 0.10.0 fixed the issue.

@vojtajina
Copy link
Contributor Author

master: 7ad703c
stable: 612486e

@geddski
Copy link

geddski commented Apr 1, 2013

@vojtajina yep that fixed it, thx.

@vojtajina
Copy link
Contributor Author

I pushed stable release on Friday, which should be compatible with Node.js 0.10 and set up travis to run all the tests both on 0.8 and 0.10.

So closing for now, please re-open if you find any more problems.

@vict-shevchenko
Copy link

Sorry, but there is still warning during installation:

npm WARN engine chokidar@0.5.3: wanted: {"node":"~0.6.10 || 0.7 || 0.8 || 0.9"} (current: {"node":"v0.10.0","npm":"1.2.14"})

@dignifiedquire
Copy link
Member

@vojtajina we need to cherrypick 7ad703c into stable to update all the dependencies for 0.10.

@dignifiedquire dignifiedquire reopened this Apr 1, 2013
vojtajina added a commit that referenced this issue Apr 1, 2013
This improves compatability with node 0.10.
See #400.
@dignifiedquire
Copy link
Member

Done. Also added both versions of log4js, so we don't need to release a new version when they fix it on their end. See #448
@vict-shevchenko This should solve the problem, we were using an old version of chokidar (the latest is 0.6.2)
@vojtajina Can check this and push a new stable?

@vojtajina
Copy link
Contributor Author

I intentionally didn't merge 7ad703c into stable. We need to rethink this whole dependencies mess...

@dignifiedquire
Copy link
Member

@vojtajina Oh :( Sorry yeah this is a big mess I'll revert it then for now.

@vojtajina
Copy link
Contributor Author

The dependency mess was not caused by you ;-) There are just too many variables in this matrix...

#449

I'm gonna take care of it now and push another stable release.

@vojtajina
Copy link
Contributor Author

OMG, this is crazy!

I hacked the install script to install proper version of log4js (to workaround https://github.com/isaacs/npm/issues/3305), so Travis seems to be fine for both 0.8 and 0.10 now.

Can anybody try installing karma on 0.8 and 0.10 node on Windows ? I'm about to push it to npm.

@vojtajina vojtajina reopened this Apr 2, 2013
@vict-shevchenko
Copy link

Hi, this is what i have on Windows 7 x86, node 0.10

C:\Users\contact\AppData\Roaming\npm>npm uninstall testacular
C:\Users\contact\AppData\Roaming\npm>npm uninstall karma
C:\Users\contact\AppData\Roaming\npm>npm cache clean
C:\Users\contact\AppData\Roaming\npm>npm install -g karma

npm ERR! not a package C:\Users\contact\AppData\Local\Temp\npm-5596\136487733637
1-0.255236794706434\tmp.tgz
npm http GET https://registry.npmjs.org/karma
.
.
.
npm WARN engine chokidar@0.5.3: wanted: {"node":"~0.6.10 || 0.7 || 0.8 || 0.9"}
(current: {"node":"v0.10.0","npm":"1.2.14"})
npm http GET https://registry.npmjs.org/graceful-fs
.
.
.
npm http 200 https://registry.npmjs.org/rimraf/-/rimraf-1.0.9.tgz
npm ERR! cb() never called!
npm ERR! not ok code 0

C:\Users\contact\AppData\Roaming\npm>karma --version
Karma version: 0.8.1

PS: previously I had some problem with VCBuild.exe was not found, now its gone.

@vict-shevchenko
Copy link

By the way, sorry for spam, may be it can help. this happens when I run test.bat(karma start)

D:\web\angular\angular-phonecat\scripts>test.bat

module.js:340
throw err;
^
Error: Cannot find module 'socket.io-client'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Users\contact\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\lib\socket.io.js:12:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

@vojtajina
Copy link
Contributor Author

Sorry, I though trying from master, before I publish it. Anyway, it's pushed to npm now, can you try it again ?

Update node to 0.10.2 first - the error with callback you got is due to a bug in NPM that has been fixed in 0.10.2.

The second error you sent was because the installation failed (so you don't have socket.io-client dependency). It should abort whole installation, but on Windows, I'm not surprised with anything.

@vict-shevchenko
Copy link

Hi, now there is no warning about version. Seems fix is ok.

I've got next:

ws@0.4.25 install C:\Users\contact\AppData\Roaming\npm\node_modules\karma\node
_modules\socket.io\node_modules\socket.io-client\node_modules\ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

C:\Users\contact\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\n
ode_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nodejs\node_
modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebui
ld
C:\Users\contact\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
node_modules\socket.io-client\node_modules\ws\build\binding.sln : error MSB3411
: Could not load the Visual C++ component "VCBuild.exe". If the component is no
t installed, either 1) install the Microsoft Windows SDK for Windows Server 200
8 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008.
C:\Users\contact\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io
node_modules\socket.io-client\node_modules\ws\build\binding.sln : error MSB3411
: Could not load the Visual C++ component "VCBuild.exe". If the component is no
t installed, either 1) install the Microsoft Windows SDK for Windows Server 200
8 and .NET Framework 3.5, or 2) install Microsoft Visual Studio 2008.
C:\Users\contact\AppData\Roaming\npm\karma -> C:\Users\contact\AppData\Roaming\n
pm\node_modules\karma\bin\karma

karma@0.8.2 install C:\Users\contact\AppData\Roaming\npm\node_modules\karma
node install-log4js.js

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:948:11)
at Process.ChildProcess._handle.onexit (child_process.js:739:34)
npm ERR! karma@0.8.2 install: node install-log4js.js
npm ERR! cmd "/c" "node install-log4js.js" failed with 8
npm ERR!
npm ERR! Failed at the karma@0.8.2 install script.
npm ERR! This is most likely a problem with the karma package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install-log4js.js
npm ERR! You can get their info via:
npm ERR! npm owner ls karma
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\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "karma"
npm ERR! cwd C:\Users\contact\AppData\Roaming
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\contact\AppData\Roaming\npm-debug.log
npm ERR! not ok code 0

But seems it is bcause of problems with my environment. I will dig into it, thanks a lot for help!

@ghost
Copy link

ghost commented Apr 2, 2013

I have the same error as above:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:948:11)
at Process.ChildProcess._handle.onexit (child_process.js:739:34)

I think the error is in the install-log4js.js file, which uses the spawn function from child_process module to install the log4js dependency, which for some reason throws this error. I tested the spawn function outside the installation process and it throws the same error. The exec function from the same module works, don't know if it is a good replacement in the install-log4js.js file.
I have a windows 7 machine and I installed nodejs v0.10.2.

@Narretz
Copy link

Narretz commented Apr 2, 2013

I can confirm this error. I wonder if the error
``cmd "/c" "node install-log4js.js" failed with 8
is incomplete and if so, how you can read the complete error (or is 8 the status?)

@ngiebel
Copy link

ngiebel commented Apr 2, 2013

The reason why npm install is not working on windows took me a bit to track down for some reason even though I went though something similar yesterday... In the new hack script https://github.com/karma-runner/karma/blob/master/install-log4js.js the spawn calls will not work. To make them work in windows they would have to take the following form:

spawn( 'cmd', ['/C','npm install log4js@0.6.2'], {stdio: 'inherit'});

oddly though if they were made to be exec calls instead the cmd hack does not need to be used on a windows machine...

On a side note, I am unable to run npm install if I pre-link node_modules/karma to .. prior - I have not figured out why it fails at that point yet.

@vojtajina
Copy link
Contributor Author

Can you try installing 0.8.3, it should be fixed ?

@vict-shevchenko
Copy link

Hi!
I still receve message about VCBuild.exe not found, but seems that installation was successful.

C:\Users\contact\AppData\Roaming\npm>karma --version
Karma version: 0.8.3

Should I just close eyes on message about VCBuild.exe?

Also when I run karma start (i am practicing on AngularJs tutorial by modifying testacular to karma) by test.bat(or test.sh via Git bush) I receive:

INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
ERROR [karma]: { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall:'spawn' }
Error: spawn ENOENT
at errnoException (child_process.js:948:11)
at Process.ChildProcess._handle.onexit (child_process.js:739:34)

Chrome was not started(when test.sh - also there are meaasges about ports 9876,9100 in use)

Can it be problems of installtion or other issue? or my own problems?

@ghost
Copy link

ghost commented Apr 3, 2013

Now it works for me. Thank you.

@vojtajina
Copy link
Contributor Author

@vict-shevchenko sounds like it can't find chrome.exe, by default it tries LOCALAPPDATA + '\\Google\\Chrome\\Application\\chrome.exe' on Windows. You can set env variable CHROME_BIN.

It looks like Node 0.10 changed spawn to actually throw an exception rather then exit the process with error, if there's no file.

@vojtajina
Copy link
Contributor Author

@vict-shevchenko As for the VCBuild.exe error - that's trying to compile some native extension (I guess it's ws, which has a JS fallback, so it should work even if this compilation fails).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests