Skip to content
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

installation error #101

Open
victorvijay opened this issue Aug 20, 2021 · 1 comment · May be fixed by #102
Open

installation error #101

victorvijay opened this issue Aug 20, 2021 · 1 comment · May be fixed by #102

Comments

@victorvijay
Copy link

victorvijay commented Aug 20, 2021

We are getting this error while running the app after installing the lib.

warn Package spherical-geometry-js has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports"

this package itself specifies a main module field that could not be resolved (/Applications/Projects/folder/node_modules/spherical-geometry-js/index. Indeed, none of these files exist:

@dansimau
Copy link

dansimau commented Jun 1, 2022

Diff to fix:

diff --git a/node_modules/spherical-geometry-js/package.json b/node_modules/spherical-geometry-js/package.json
index 8625550..7f61fbb 100644
--- a/node_modules/spherical-geometry-js/package.json
+++ b/node_modules/spherical-geometry-js/package.json
@@ -12,7 +12,11 @@
   "bugs": "https://github.com/NotWoods/spherical-geometry-js/issues",
   "homepage": "https://github.com/NotWoods/spherical-geometry-js#readme",
   "type": "module",
-  "exports": "./src/index.js",
+  "exports": {
+    "./package.json": "./package.json",
+    ".": "./src/index.js"
+  },
+  "main": "src/index.js",
   "module": "src/index.js",
   "types": "src/index.d.ts",
   "sideEffects": false,

@felixgabler felixgabler linked a pull request Oct 8, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants