Closed Mikey-ShenSu closed 6 months ago
12
I believe I am already in the latest version, and "main": "./dist/index.js"
is added by default in the latest update, still no luck for me :(.
{
"name": "elysia-ip",
"version": "1.0.2",
"type": "module",
"author": {
"name": "Gaurish Sethia",
"url": "https://github.com/gaurishhs",
"email": "gaurishh.sethia@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/gaurishhs/elysia-ip"
},
"exports": {
"main": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.js",
"node": "./dist/index.js",
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"bugs": "https://github.com/gaurishhs/elysia-ip/issues",
"homepage": "https://github.com/gaurishhs/elysia-ip",
"keywords": [
"elysia",
"typescript",
"ip"
],
"scripts": {
"build": "tsc",
"lint": "eslint . --ext .ts"
},
"license": "MIT",
"devDependencies": {
"@types/bun": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"elysia": "^1.0.9",
"eslint": "^8.50.0",
"typescript": "^5.3.3"
},
"peerDependencies": {
"elysia": ">= 1.0.9"
}
}
This fix worked for someone else as well which is why i published it. It follows the convention as well, so irdk what the problem might be
i have the same problem and I just found a solution. i don't know why, but when I copy the "main": "./dist/index.js"
into the "main object" (idk how to call it) it works. looks like this now:
{
"name": "elysia-ip",
"version": "1.0.2",
"type": "module",
"author": {
"name": "Gaurish Sethia",
"url": "https://github.com/gaurishhs",
"email": "gaurishh.sethia@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/gaurishhs/elysia-ip"
},
"main": "./dist/index.js",
"exports": {
"main": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.js",
"node": "./dist/index.js",
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"bugs": "https://github.com/gaurishhs/elysia-ip/issues",
"homepage": "https://github.com/gaurishhs/elysia-ip",
"keywords": [
"elysia",
"typescript",
"ip"
],
"scripts": {
"build": "tsc",
"lint": "eslint . --ext .ts"
},
"license": "MIT",
"devDependencies": {
"@types/bun": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"elysia": "^1.0.9",
"eslint": "^8.50.0",
"typescript": "^5.3.3"
},
"peerDependencies": {
"elysia": ">= 1.0.9"
}
}
i have the same problem and I just found a solution. i don't know why, but when I copy the
"main": "./dist/index.js"
into the "main object" (idk how to call it) it works. looks like this now:{ "name": "elysia-ip", "version": "1.0.2", "type": "module", "author": { "name": "Gaurish Sethia", "url": "https://github.com/gaurishhs", "email": "gaurishh.sethia@gmail.com" }, "repository": { "type": "git", "url": "https://github.com/gaurishhs/elysia-ip" }, "main": "./dist/index.js", "exports": { "main": "./dist/index.js", "require": "./dist/index.js", "import": "./dist/index.js", "node": "./dist/index.js", "default": "./dist/index.js", "types": "./dist/index.d.ts" }, "bugs": "https://github.com/gaurishhs/elysia-ip/issues", "homepage": "https://github.com/gaurishhs/elysia-ip", "keywords": [ "elysia", "typescript", "ip" ], "scripts": { "build": "tsc", "lint": "eslint . --ext .ts" }, "license": "MIT", "devDependencies": { "@types/bun": "^1.0.2", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", "elysia": "^1.0.9", "eslint": "^8.50.0", "typescript": "^5.3.3" }, "peerDependencies": { "elysia": ">= 1.0.9" } }
yeah it works for me too, tho idk why
I don't get it either
I did that, it didn't help. It would be ideal, of course, to solve this problem without having to specify anything else anywhere.
agree
I haven't been able to understand this issue. I have made multiple commits trying to fix this since earlier versions as well. #5 seemed to work for some but soon countering that release was #8 The package.json follows the normal convention as it should so i really don't know what the issue is. It always has been like this since the start, It works for some it doesn't for some.
Fixed in latest version
I don't know what is causing the issue.