Skip to content

MPP JS client: Can't resolve 'text-encoding' #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
epool opened this issue May 6, 2019 · 1 comment
Closed

MPP JS client: Can't resolve 'text-encoding' #49

epool opened this issue May 6, 2019 · 1 comment

Comments

@epool
Copy link

epool commented May 6, 2019

COPIED FROM: ktorio/ktor#961

Ktor Version
1.1.2

Ktor Engine Used(client or server and name)
Ktor client with default engine

JVM Version, Operating System and Relevant Context
JDK 1.8, Windows, Kotlin JS

Feedback
We are using the ktor client in a multiplatform project (android, iOS and web). Starting with version 1.1.0 the build of the JS client fails with the following message:

ERROR in ./kotlinx-io.js
Module not found: Error: Can't resolve 'text-encoding' in '<mypath>\kotlinmultiplatform\web\build\kotlin-js-min\main'
@ ./kotlinx-io.js 5309:21-45 5320:21-45
@ ./ktor-utils.js
@ ./web.js

If I manually add text-encoding as a npm-dependeny, it works.

If I list the npm dependency tree with the previous working ktor version 1.0.1 I get:

+-- kotlinx-io@0.1.4 -> <mypath>\kotlinmultiplatform\web\build\node_modules_imported\kotlinx-io extraneous
+-- kotlinx-io-js@0.1.1 -> <mypath>\kotlinmultiplatform\web\build\node_modules_imported\kotlinx-io-js
| +-- kotlin@1.3.10
| +-- kotlin-test@1.3.10
| | `-- kotlin@1.3.10 deduped
| +-- kotlinx-atomicfu@0.11.12 -> <mypath>\kotlinmultiplatform\web\build\node_modules_imported\kotlinx-atomicfu deduped
| `-- text-encoding@0.7.0

If I list the npm dependency tree with a ktor version >= 1.1.0 the kotlinx-io-js (and of course text-encoding) is missing

@epool epool closed this as completed May 6, 2019
@dhakehurst
Copy link

see #57 for workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants