steelbrain / steelbrain/node-ssh
Webpack compatibility issue since v9+
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
I've been able to successfully bundle node-ssh with webpack, up to version 8.0.0 of node-ssh. However, since upgrading to the latest version of node-ssh (11.1.0), something appears to have broken compatibility, and the following error has started to appear during the web-packing.
Appreciate that the issue may not be with node-ssh itself, but that the resolution may involve having to adjust my web-pack configuration. But any detail about what change since v9+ may be causing this would be greatly appreciated. :)
``
ERROR in ./node_modules/node-ssh/lib/esm/index.mjs 107:22-36
Can't import the named export 'AssertionError' from non EcmaScript module (only default export is available)
@ ./build/test.js
ERROR in ./node_modules/node-ssh/lib/esm/index.mjs 120:34-48
Can't import the named export 'AssertionError' from non EcmaScript module (only default export is available)
@ ./build/test.js
ERROR in ./node_modules/node-ssh/lib/esm/index.mjs 402:26-38
Can't import the named export 'PromiseQueue' from non EcmaScript module (only default export is available)
@ ./build/test.js
ERROR in ./node_modules/node-ssh/lib/esm/index.mjs 451:34-46
Can't import the named export 'PromiseQueue' from non EcmaScript module (only default export is available)
@ ./build/test.js
ERROR in ./node_modules/node-ssh/lib/esm/index.mjs 463:34-46
Can't import the named export 'PromiseQueue' from non EcmaScript module (only default export is available)
@ ./build/test.js
ERROR in ./node_modules/node-ssh/lib/esm/index.mjs 547:34-46
Can't import the named export 'PromiseQueue' from non EcmaScript module (only default export is available)
@ ./build/test.js
ERROR in ./node_modules/node-ssh/lib/esm/index.mjs 559:34-46
Can't import the named export 'PromiseQueue' from non EcmaScript module (only default export is available)
@ ./build/test.js
``
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the failing imports in node_modules/node-ssh/lib/esm/index.mjs and reproduce the webpack build from build/test.js. Compare the package contents and module behavior between node-ssh 8.0.0 and 11.1.0, including the webpack configuration if available. Done means the change causing the named-export errors is identified and compatibility guidance or a verified fix is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100