Open Leonidas-from-XIV opened 10 years ago
this commit doesn't fix it for you? What version of zap are you using?
I hoped it would, so I updated to 0.2.6, but the error remained the same. Maybe you could try running the tests.
That is actually quite strange, since Travis seems to be running the tests fine.
What is adding exports, require, module, __filename, __dirname) {
to the beginning of that file?
I have no idea. That doesn't even make any sense.
I successfully ran this on my machine:
$ git clone https://github.com/toddrbryan/node-xml2js
$ cd node-xml2js
$ git checkout sax-error
$ npm install
$ ./node_modules/zap/bin/zap
$ coffee --version
CoffeeScript version 1.7.1
Seems to be something wrong with my installation. I already reinstalled CoffeeScript, no idea. I'll write here if I find out what is happening. Thanks for checking!
@Leonidas-from-XIV
Have you updated global zap module by running [sudo] npm update -g zap
?
The command npm test
uses the module installed to node_modules
of your project (cf. https://www.npmjs.org/doc/misc/npm-scripts.html#path), but the command zap
uses the module installed globally.
Yes, I used the global zap
which I reinstalled for checking:
% ls -l /usr/bin/zap
lrwxrwxrwx 1 root root 31 Mar 25 20:27 /usr/bin/zap -> ../lib/node_modules/zap/bin/zap
/usr/lib/node_modules/zap/package.json
says the version is 0.2.6, which seems to be correct, too.
This odd prefix seems to be somehow coming from Node.js itself: http://eli.thegreenplace.net/2013/05/27/how-require-loads-modules-in-node-js/ and http://stackoverflow.com/a/13622513
How about npm test
, instead of zap
?
Can you paste the output of node --version
and coffee --version
(and, for good measure, which zap
)?
When I run a test in CoffeeScript (1.7.1) it fails:
If I compile that manually, it works fine:
I suppose it has something to do with CoffeeScript 1.7, but no idea what broke.