Hi, I just found that the node process would get stuck when running the following index.js file with node --inspect -r @std/esm index.js, which may somehow be related to #178 .
console.log('# sourceMappingURL')
console.log('work')
@std/esm version: 0.18.0node version: 9.2 on macOS, 9.2 on Ubuntu 16.04 and 9.3 on Ubuntu 16.04
expected behavior: node exits after printing # sourceMappingURL and work
node gets stuckI've tried some modifications, which may be helpful for debugging:
--inspect flag: node -r @std/esm index.js works@std/esm in package.json: "sourceMap": false works with --inspect flag// console.log('# sourceMappingURL') does not workconsole.log('first line') above the first line: node process gets stuck without even printing first lineOriginally I found this when importing pug, which eventually requires [email protected]/lib/imports/inliner containing a regexp /\/\*# sourceMappingURL=(\S+) \*\//
Are there anything I am missing or doing wrong, or is this just a bug? Thanks in advance!
Hi @Mensu!
Can you please create a simple repro repo. I haven't been able to reproduce this in the past so without a repro repo this will end up getting closed as invalid.
Update:
I can't repro on master with the example provided.
@jdalton Sorry for my late reply. Here's the repro repo: Mensu/std-esm-repro-issue-207
I now found that it is NOT related to flag --inspect. It is related to the "sourceMap": true option. That's why I turned on this option in the repro repo by default.
I also tried requiring from master by the following steps, and node still got stuck...
git clone [email protected]:standard-things/esm.git
cd esm
npm i
npm run build:prod
cd ..
node -r ./esm index.js
I would be glad if you could check it out again with the repro repo. Thanks in advance!
Thanks @Mensu!
I can repro this.
Update:
I fixed the issue locally, will create a unit test and push in a bit.
@std/esm v0.19.0 is released :tada:
Most helpful comment
Thanks @Mensu!
I can repro this.
Update:
I fixed the issue locally, will create a unit test and push in a bit.