Ahmed Elzeiny
04/05/2023, 7:00 PMruntimeOnly(npm("abort-controller", "3.0.0"))
runtimeOnly(npm("node-fetch", "2.6.1"))
I have verified that these dependencies exist and are installed, but I am still getting the same error. Here are my versions:
private const val ktorVersion = "2.2.3"
I am using Kotlin version 1.8.0.
any insights or workarounds to fix it ?Big Chungus
04/05/2023, 10:35 PMAhmed Elzeiny
04/06/2023, 5:48 PMkotlin {
android()
val xcf = XCFramework(libName)
iosArm64 {
binaries.framework {
baseName = libName
xcf.add(this)
}
}
val iosSims = listOf(iosX64(), iosSimulatorArm64())
configure(iosSims) {
binaries.framework {
baseName = libName
xcf.add(this)
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
}
}
js(IR) {
nodejs()
binaries.library()
}
android {
publishLibraryVariants("release", "debug")
}
multiplatformSwiftPackage {
packageName(libName)
swiftToolsVersion("5.5")
targetPlatforms {
iOS { v("11") }
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation(Dependency.Kotlin.DATE_TIME)
implementation(Dependency.Kotlin.COROUTINES)
implementation(Dependency.Kotlin.ATOMICS)
}
}
val androidMain by getting {
dependencies {
dependsOn(commonMain)
implementation("androidx.security:security-crypto:1.0.0")
}
}
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
dependencies {}
}
val jsMain by getting {
dependsOn(commonMain)
dependencies {
runtimeOnly(npm("text-encoding", "0.7.0"))
runtimeOnly(npm("abort-controller", "3.0.0"))
runtimeOnly(npm("node-fetch", "2.6.1"))
}
}
}
}
Big Chungus
04/06/2023, 7:40 PMAhmed Elzeiny
04/06/2023, 7:45 PMnpmPublish {
organization.set(gradleLocalProperties(rootDir).getProperty("PUBLISH_GITHUB_ORGANIZATION"))
packages {
named("js") {
packageJson {
author {
name.set("org")
}
repository {
type.set("git")
url.set("<https://github.com/org/org-kmm.git>")
}
}
}
}
registries {
github {
access.set(dev.petuska.npm.publish.extension.domain.NpmAccess.RESTRICTED)
authToken.set(gradleLocalProperties(rootDir).getProperty("PUBLISH_GITHUB_AUTH_TOKEN"))
}
}
}
id("dev.petuska.npm.publish") version "3.2.1"
@Big Chungus I’m already using it, and i’m publishing my version using publishJsPackageToGithubRegistry
do I need to change anything on it ?Big Chungus
04/06/2023, 7:46 PMAhmed Elzeiny
04/06/2023, 7:48 PMBig Chungus
04/06/2023, 7:50 PMAhmed Elzeiny
04/06/2023, 7:59 PM"dependencies": {
"abort-controller": "3.0.0",
"node-fetch": "2.6.1",
"text-encoding": "0.7.0",
"ws": "8.5.0",
"@js-joda/core": "3.2.0"
}
Big Chungus
04/06/2023, 8:01 PMAhmed Elzeiny
04/06/2023, 8:02 PMBig Chungus
04/06/2023, 8:03 PMAhmed Elzeiny
04/06/2023, 8:04 PM3fQ.6wmu1ePjaTDj-J_TtLnneW_yxbPKC8K_wDSPesjOKJk
getCards: starting fetching getCards
TRACE: Applied DefaultRequest to <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>. New url: <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>
TRACE: Adding Accept=application header for <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>
TRACE: Body type class EmptyContent is in ignored types. Skipping ContentNegotiation for <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>.
TRACE: Adding Accept-Charset=UTF-8 to <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>
TRACE: Processing exception Error: Cannot find module 'abort-controller'
Require stack:
- /var/task/.next/server/chunks/768.js
- /var/task/.next/server/webpack-runtime.js
- /var/task/.next/server/pages/_document.js
- /var/task/node_modules/next/dist/server/require.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs for request <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>
Error: Cannot find module 'abort-controller'
Require stack:
- /var/task/.next/server/chunks/768.js
- /var/task/.next/server/webpack-runtime.js
- /var/task/.next/server/pages/_document.js
- /var/task/node_modules/next/dist/server/require.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
at mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:23:32)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at AbortController_0 (/var/task/.next/server/chunks/768.js:41498:45)
at commonFetch (/var/task/.next/server/chunks/768.js:41469:26)
at $executeCOROUTINE$16.zf (/var/task/.next/server/chunks/768.js:40872:37)
at JsClientEngine.f28 (/var/task/.next/server/chunks/768.js:40988:20)
at HttpClientEngine$executeWithinCallContext$slambda.zf (/var/task/.next/server/chunks/768.js:36485:48) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/var/task/.next/server/chunks/768.js',
'/var/task/.next/server/webpack-runtime.js',
'/var/task/.next/server/pages/_document.js',
'/var/task/node_modules/next/dist/server/require.js',
'/var/task/node_modules/next/dist/server/next-server.js',
'/var/task/___next_launcher.cjs'
]
}
[Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
digest: '2805196926'
}
Big Chungus
04/06/2023, 8:05 PMAhmed Elzeiny
04/06/2023, 8:06 PMRequestId: 42fe86f7-6a5a-462a-841e-7fd936d6b40d Version: $LATEST
attempting to fetch cards using kmm
getCards: try to getCards with token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTAsImlhdCI6MTY4MDc5NDA2NywiZXhwIjoxNzEyMzMwMDY3fQ.6wmu1ePjaTDj-J_TtLnneW_yxbPKC8K_wDSPesjOKJk
getCards: starting fetching getCards
TRACE: Applied DefaultRequest to <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>. New url: <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>
TRACE: Adding Accept=application header for <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>
TRACE: Body type class EmptyContent is in ignored types. Skipping ContentNegotiation for <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>.
TRACE: Adding Accept-Charset=UTF-8 to <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>
TRACE: Processing exception Error: Cannot find module 'abort-controller'
Require stack:
- /var/task/.next/server/chunks/768.js
- /var/task/.next/server/webpack-runtime.js
- /var/task/.next/server/pages/_document.js
- /var/task/node_modules/next/dist/server/require.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs for request <https://dev-api.mywebsite.com/api/cards?pagination%5Bpage%5D=1&pagination%5BpageSize%5D=10&pagination%5BwithCount%5D=true>
Error: Cannot find module 'abort-controller'
Require stack:
- /var/task/.next/server/chunks/768.js
- /var/task/.next/server/webpack-runtime.js
- /var/task/.next/server/pages/_document.js
- /var/task/node_modules/next/dist/server/require.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
at mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:23:32)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at AbortController_0 (/var/task/.next/server/chunks/768.js:41498:45)
at commonFetch (/var/task/.next/server/chunks/768.js:41469:26)
at $executeCOROUTINE$16.zf (/var/task/.next/server/chunks/768.js:40872:37)
at JsClientEngine.f28 (/var/task/.next/server/chunks/768.js:40988:20)
at HttpClientEngine$executeWithinCallContext$slambda.zf (/var/task/.next/server/chunks/768.js:36485:48) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/var/task/.next/server/chunks/768.js',
'/var/task/.next/server/webpack-runtime.js',
'/var/task/.next/server/pages/_document.js',
'/var/task/node_modules/next/dist/server/require.js',
'/var/task/node_modules/next/dist/server/next-server.js',
'/var/task/___next_launcher.cjs'
]
}
Big Chungus
04/06/2023, 8:21 PMAhmed Elzeiny
04/06/2023, 8:22 PMBig Chungus
04/06/2023, 8:22 PMAhmed Elzeiny
04/06/2023, 8:23 PMBig Chungus
04/06/2023, 8:23 PMAhmed Elzeiny
04/06/2023, 8:25 PM