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

Windows compatibility, Unhandled rejection TypeError #8

Closed
stan-kondrat opened this issue Apr 21, 2016 · 3 comments
Closed

Windows compatibility, Unhandled rejection TypeError #8

stan-kondrat opened this issue Apr 21, 2016 · 3 comments

Comments

@stan-kondrat
Copy link

Hello, I have problem run Small (latest, 0.2.4):

$ ./node_modules/small/bin.js  -i test.js -o output.js
Unhandled rejection TypeError: Cannot read property 'kind' of undefined
    at Object.isDeclarationName (D:\node_modules\typescript\lib\typescript.js:6290:19)
    at Object.getSymbolAtLocation (D:\node_modules\typescript\lib\typescript.js:26240:20)
    at Function.ImportReference.tryParse (D:\node_modules\small\release\node.js:241:34)
    at Function.ImportReference.tryParse (D:\node_modules\small\release\node.js:257:44)
    at Walker.callback (D:\node_modules\small\release\parser.js:48:52)
    at Walker.visit (D:\node_modules\small\release\parser.js:115:14)
    at D:\node_modules\small\release\parser.js:123:63
    at visitNode (D:\node_modules\typescript\lib\typescript.js:7405:20)
    at Object.forEachChild (D:\node_modules\typescript\lib\typescript.js:7529:24)
    at Walker.descend (D:\node_modules\small\release\parser.js:123:12)
    at Walker.callback (D:\node_modules\small\release\parser.js:53:24)
    at Walker.visit (D:\node_modules\small\release\parser.js:115:14)
    at D:\node_modules\small\release\parser.js:123:63
    at visitNode (D:\node_modules\typescript\lib\typescript.js:7405:20)
    at Object.forEachChild (D:\node_modules\typescript\lib\typescript.js:7583:24)
    at Walker.descend (D:\node_modules\small\release\parser.js:123:12)
OS Name:                   Microsoft Windows 8.1 Enterprise
OS Version:                6.3.9600 N/A Build 9600
$ npm -v 
3.4.1
$ node -v
v4.2.2

Do you have any idea how to fix this?

@ivogabe
Copy link
Owner

ivogabe commented Apr 21, 2016

Thanks for reporting, I wasn't aware of this issue. Does there is something special with test.js? Or does it even show this error on an empty file? I hope to take a look at this next week or this weekend.

@stan-kondrat
Copy link
Author

Also, I check in Windows 10, same problem.

$ cat test.js
var libs = require('./libs');
console.log(libs.hello());

$ cat libs.js
module.exports = {
        hello: function(){
                return 'Hello world'
        }
}

$ node test.js
Hello world

@ivogabe
Copy link
Owner

ivogabe commented May 15, 2016

I could reproduce the issue and I've fixed it. I needed to pass an extra argument to the parser, though somehow it was working on Mac without this parameter. Anyway, I've released it as 0.2.5, can you check that it is working for you now?

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

No branches or pull requests

2 participants