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

Cannot build in Node >= 8.3.0 #19

Open
mixonic opened this issue Oct 6, 2017 · 2 comments
Open

Cannot build in Node >= 8.3.0 #19

mixonic opened this issue Oct 6, 2017 · 2 comments

Comments

@mixonic
Copy link
Member

mixonic commented Oct 6, 2017

In Node 8.2.1 I can build the resolve, in 8.3.0 and greater I get a failure ala:

screen shot 2017-10-05 at 9 56 47 pm

I spent some time debugging this and it seams the return value from getFileName here is sometimes null. I tried to add a reproduction test on https://github.com/glimmerjs/glimmer-build but failed.

Refs: glimmerjs/glimmer-build#49

@mansona
Copy link

mansona commented Nov 27, 2017

So I spent a bit of time looking into this and the reason why the stackFrame.getFileName() is null is because that stack frame is actually an anonymous Array.map() so theoretically it doesn't have a file name 😕

I don't know what the desired behaviour is but maybe we should continue looping through the stack until we come across a file? Again I'm not entirely sure what the use case is.

This is the first few lines of the stack at that point:

pathToCaller (/Users/mansona/git/stonecircle/opensource/ember/glimmer-resolver/node_modules/@glimmer/build/lib/resolve-package.js:17:35)
module.exports (/Users/mansona/git/stonecircle/opensource/ember/glimmer-resolver/node_modules/@glimmer/build/lib/resolve-package.js:9:20)
module.exports (/Users/mansona/git/stonecircle/opensource/ember/glimmer-resolver/node_modules/@glimmer/build/lib/package-dist.js:12:30)
Array.map (<anonymous>)
module.exports (/Users/mansona/git/stonecircle/opensource/ember/glimmer-resolver/node_modules/@glimmer/build/index.js:60:53)
Object.<anonymous> (/Users/mansona/git/stonecircle/opensource/ember/glimmer-resolver/Brocfile.js:5:18)
Module._compile (module.js:573:30)
Object.Module._extensions..js (module.js:584:10)

I'm assuming the desired stack line would be: Object.<anonymous> (/Users/mansona/git/stonecircle/opensource/ember/glimmer-resolver/Brocfile.js:5:18)?

@mansona
Copy link

mansona commented Nov 27, 2017

btw this test passes if I manually change the index here https://github.com/glimmerjs/glimmer-build/blob/master/lib/resolve-package.js#L15 to 5, which would point at the stack item: Object.<anonymous> (/Users/mansona/git/stonecircle/opensource/ember/glimmer-resolver/Brocfile.js:5:18)

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