phosphor-icons / vue

A flexible icon family for Vue
https://phosphoricons.com
MIT License
196 stars 20 forks source link

Module not found: Error: Default condition should be last one #36

Closed Metsavend closed 1 year ago

Metsavend commented 1 year ago

📚 What are you trying to do?

import { PhCircle,PhTextAa,PhEyeSlash } from "@phosphor-icons/vue";

this line makes me below error. Does not understand what is issue. I have other appas well and all working fine.

Module not found: Error: Default condition should be last one

ERROR in ./src/Student/components/CustomElements/PIcons.vue?vue&type=script&setup=true&lang=js (./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/Student/components/CustomElements/PIcons.vue?vue&type=script&setup=true&lang=js) 3:0-2137
Module not found: Error: Default condition should be last one
 @ ./src/Student/components/CustomElements/PIcons.vue?vue&type=script&setup=true&lang=js 1:0-221 1:0-221 1:222-432 1:222-432
 @ ./src/Student/components/CustomElements/PIcons.vue 2:0-68 3:0-63 3:0-63 6:49-55
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/Student/StudentData.vue?vue&type=script&setup=true&lang=js 8:0-60 106:14-20
 @ ./src/Student/StudentData.vue?vue&type=script&setup=true&lang=js 1:0-214 1:0-214 1:215-418 1:215-418
 @ ./src/Student/StudentData.vue 2:0-73 3:0-68 3:0-68 6:49-55
 @ ./src/router/routes.js 265:15-51
 @ ./src/main.js 12:0-40 113:8-14

🔍 What have you tried?

Tryed reeinstall phosphor with npm , other versions start again and so on. I came from vue 2 to vue 3 and this problem comes.

ℹī¸ Additional context

No response

dr-iroh commented 1 year ago

I have the same issue

hypernova7 commented 1 year ago

This issue can fix like this:

package.json

  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
-     "default": "./dist/index.mjs",
      "import": "./dist/index.mjs",
+     "default": "./dist/index.mjs"
    },
    "./compact": {
      "types": "./dist/index.d.ts",
-     "default": "./dist/index.compact.mjs",
      "import": "./dist/index.compact.mjs",
+     "default": "./dist/index.compact.mjs"
    }
  },
dnlsndr commented 1 year ago

Thanks for solving this, I was not aware that order matters here. Will create a release ASAP.