node -v = v8.9.0
See https://github.com/vjpr/issue-esm-pnpm
node -r esm index.js
{ request: 'is-regexp',
parent: Module {
children: [],
exports: {},
filename: '/Users/Vaughan/dev-scratch/node_modules/stringify-object/index.js',
id: '/Users/Vaughan/dev-scratch/node_modules/stringify-object/index.js',
loaded: false,
parent: undefined,
paths: [ '/Users/Vaughan/dev-scratch/node_modules/stringify-object/node_modules',
'/Users/Vaughan/dev-scratch/node_modules',
'/Users/Vaughan/node_modules',
'/Users/node_modules',
'/node_modules' ] } }
/Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1
Error: Cannot find module 'is-regexp'
at Proxy.<anonymous> (/Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1)
at Proxy.require.Module._resolveFilename (/Users/Vaughan/dev-scratch/esm-pnpm-issue/index.js:9:39)
at Proxy.<anonymous> (/Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1)
at Object.<anonymous> (/Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1)
at Object.t (/Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1)
at o (/Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1)
at Object.<anonymous> (/Users/Vaughan/dev-scratch/node_modules/stringify-object/index.js:2:18)
at Object.<anonymous> (/Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1)
at xu (/Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1)
at /Users/Vaughan/dev-scratch/esm-pnpm-issue/node_modules/.registry.npmjs.org/esm/3.0.72/node_modules/esm/esm.js:1
thank you for the bug report @vjpr !
it looks like esm has problems with symlinks.
@jdalton in order for the repro to succeed (or, should I say successfully fail), it is paramount to install the dependencies as the issue title suggests with pnpm.
https://pnpm.js.org/docs/en/installation.html
npm i -g pnpm
pnpm i
node -r esm main.mjs
Thanks @vjpr! _(and @dnalborczyk!)_
The issue was around resolving hard-links.
I'll try to come up with a test for that.
Update:
v3.0.73 is released :tada:
Most helpful comment
Thanks @vjpr! _(and @dnalborczyk!)_
The issue was around resolving hard-links.
I'll try to come up with a test for that.
Update:
v3.0.73 is released :tada: