Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Strange interaction with nodemjs #748

Closed
mk-pmb opened this issue Mar 13, 2019 · 7 comments
Closed

Strange interaction with nodemjs #748

mk-pmb opened this issue Mar 13, 2019 · 7 comments
Labels

Comments

@mk-pmb
Copy link
Contributor

mk-pmb commented Mar 13, 2019

Hi! I encountered this strange interaction with nodemjs. Maybe something about the esm cache again?

The bug occurs when:

  • The import statement is active
  • esm version 3.2.12 or later (tested up to 3.2.16) is used

Reliable work-arounds:

  • Comment-out the import statement
  • Install esm version 3.2.11

For now I'll just downgrad to esm 3.2.11, but I'd appreciate if you could find a better fix.

Update: You'll need to pin esmod-pmb to 0.1.7, because I'll release 0.1.8 with a fixed-version dep on the older esm to mitigate.

@jdalton
Copy link
Member

jdalton commented Mar 14, 2019

Hi @mk-pmb!

Your setup is pretty unique so trying to figure out how to repro it is a bit challenging. I don't have a nodejs executable and when I remapped it to node I got:

readlink: illegal option -- m

which suggests differences in the MacOS readlink utility.
Feel free to browse 3.2.11...3.2.12 to see if you can pin point a specific commit.

@mk-pmb
Copy link
Contributor Author

mk-pmb commented Mar 14, 2019

Thanks for the error report! I've dropped the requirement for GNU readlink, now using nodejs instead. Also,

As of 0.1.7, you can configure your favorite nodejs replacement via the NODEJS_CMD env var.

@jdalton
Copy link
Member

jdalton commented Mar 14, 2019

I'm still having trouble setting up a repro. Any assistance would be welcomed. For example, if you could create a small repro repo with instructions that would be fantastic!

@mk-pmb
Copy link
Contributor Author

mk-pmb commented Mar 14, 2019

Of course, no problem! I'll prepare a tarball.

@mk-pmb
Copy link
Contributor Author

mk-pmb commented Mar 14, 2019

tarball download: It's meant as the home directory of an Ubuntu user named ci-test. The demo runs with ./demo.sh. I ran it with nodejs v8.15.1 and npm 6.4.1.

@jdalton
Copy link
Member

jdalton commented Mar 15, 2019

😢I'm sorry @mk-pmb but I don't think I can run your repro. Sorry to ask you to do more legwork but the list of changes are 3.2.11...3.2.12. You could checkout each commit hash, build, and then test until your scenario breaks. This would let me know what the issue is. The good news is it's 16 commits and some can likely be skipped.

@jdalton jdalton closed this as completed Mar 15, 2019
mk-pmb added a commit to mk-pmb/std-esm-node that referenced this issue Mar 15, 2019
@mk-pmb
Copy link
Contributor Author

mk-pmb commented Mar 15, 2019

No prob, thanks for your effort on free support! :-)
I found the null options, I'll send a PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants