You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duplicate identifier error in services for commonjs module.exports.prop = #24024
Open the two tabs side-by-side in an editor. Initially there is no error, but when you make any edit (e.g., adding a newline) to b.js, then module.exports.D in a.js is marked with an error Duplicate identifier 'D'. (Making any edit to a.js will make it go away, but then editing b.js makes it come back...)
Note that the require has to be first. My current hypothesis is that getCommonJsExportEquals creates a merged symbol which is !== the symbol for class D, thereby evading the check I added in #24466. I have a simpler fix that I will put up shortly.
Activity
sandersn commentedon May 29, 2018
Note that adding a third line in a.js,
var d = new D(), causes a crash inresolveName, even from the command line. I'll file that as a separate bug.sandersn commentedon May 30, 2018
Andy (Andrewkraft) (@Andy-MS) helped me find a repro that works from the command line. Put the require in the same file:
Note that the require has to be first. My current hypothesis is that
getCommonJsExportEqualscreates a merged symbol which is!==the symbol for class D, thereby evading the check I added in #24466. I have a simpler fix that I will put up shortly.