Closed iggirex closed 7 years ago
Hey @iggirex, can you try updating to wish 1.0.0?
Hi @EvanBurchard, after an update, I didn't see anything happen in my terminal, but still got the same error. Then I installed wish again, I saw it install again and tell me it's at version 1.0.0. Still get the same error : /
I'm using Windows 10 and CMD, idk if that has anything to do with the issue...
@iggirex What's your version of node?
@EvanBurchard Node version 6.11.0
Can you update to node 7.7.1?
I just switched to Node 7.7.1 and still getting same error.
The program is just two lines of code at this point, pretty sure it's not the code:
var wish = require("wish"); wish(4===5);
I'm at a loss. What does the stack trace look like if you have a file testing.js
with this in it:
throw Error('');
And then run node testing.js
idk why this isn't getting formatted to look like code, I have the backticks. But one thing getting screwed up is the up carrot should be pointing at "throw" where it says "throw Error('');"
`C:\Users\iaguerrevere\Desktop\Refactoring JS>node testing.js C:\Users\iaguerrevere\Desktop\Refactoring JS\testing.js:1 (function (exports, require, module, filename, dirname) { throw Error(''); ^
Error
at Object.
Can you try this?
git clone git@github.com:EvanBurchard/wish.git
cd wish
npm install
npm test
I'm going to close this out for now. I think it has to do with windows compatibility, which we can track over here.
Going through Evan's book "Refactoring JS" that's how I found wish. The first example of the book using wish isn't working. When tests pass I get no message in terminal, when tests fail I get this error message:
`C:\Users\iaguerrevere\Desktop\Refactoring JS>node check-hand.js C:\Users\iaguerrevere\Desktop\Refactoring JS\node_modules\wish\lib\wish.js:88 line.fileName = line.full.match(/(\/.*.js)/)[1]; ^
TypeError: Cannot read property '1' of null at createLineFromErrorObject (C:\Users\iaguerrevere\Desktop\Refactoring JS\node_modules\wish\lib\wish.js:88:52) at getExpression (C:\Users\iaguerrevere\Desktop\Refactoring JS\node_modules\wish\lib\wish.js:107:20) at handleFalseWish (C:\Users\iaguerrevere\Desktop\Refactoring JS\node_modules\wish\lib\wish.js:126:36) at wish (C:\Users\iaguerrevere\Desktop\Refactoring JS\node_modules\wish\lib\wish.js:143:15) at Object. (C:\Users\iaguerrevere\Desktop\Refactoring JS\check-hand.js:4:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)`
Ways I've tried to fix: uninstall wish, reinstall wish, update npm, tried the simplest test scenarios possible like wish(4==5), tried changing the file name, and I should mention the tests were working using node's assert. This error message seems to be the same no matter what the failing test is.