vue3-perfect-scrollbar icon indicating copy to clipboard operation
vue3-perfect-scrollbar copied to clipboard

Missing specifier in package

Open darrinsworlds opened this issue 1 year ago • 5 comments

I am attempting to upgrade the version of the project from 1.6.1 -> 2.0.0.

After installing the new package, on running the project I receive an error message:

image

My package.json looks like this:

"dependencies": { "@fingerprintjs/fingerprintjs": "^4.2.2", "@vueuse/core": "^10.9.0", "apexcharts": "^3.48.0", "axios": "^1.6.8", "detect-browser": "^5.3.0", "gsap": "file:gsap-bonus.tgz", "js-sha256": "^0.11.0", "phone": "^3.1.42", "pinia": "^2.1.7", "vue": "^3.4.21", "vue-dndrop": "^1.3.1", "vue-drag-resize": "^2.0.3", "vue-draggable-resizable": "^3.0.0", "vue-i18n": "^9.12.1", "vue-recaptcha-v3": "^2.0.1", "vue-router": "^4.3.0", "vue-upload-component": "^3.1.8", "vue3-apexcharts": "^1.5.2", "vue3-perfect-scrollbar": "^2.0.0", "vuedraggable": "^4.1.0", "vuetify": "^3.5.15" }, "devDependencies": { "@mdi/font": "^7.4.47", "@mdi/js": "^7.4.47", "@pinia/testing": "^0.1.3", "@popperjs/core": "^2.11.8", "@rushstack/eslint-patch": "^1.10.2", "@types/greensock": "^1.15.32", "@types/gsap": "^3.0.0", "@types/node": "^20.12.7", "@vitejs/plugin-vue": "^5.0.4", "@vitest/coverage-istanbul": "^1.5.0", "@vitest/ui": "^1.5.0", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "@vue/test-utils": "^2.4.5", "@vue/tsconfig": "^0.5.1", "cypress": "^13.7.3", "eslint": "^8.57.0", "eslint-plugin-vue": "^9.25.0", "happy-dom": "^14.7.1", "jsdom": "^24.0.0", "prettier": "^3.2.5", "sass": "^1.75.0", "sass-loader": "^14.2.0", "typescript": "^5.4.5", "video.js": "^8.10.0", "vite": "^5.2.8", "vite-plugin-vuetify": "^2.0.3", "vitest": "^1.5.0", "vue-cli-plugin-vuetify": "~2.5.8", "vue-tsc": "^2.0.13", "webpack-plugin-vuetify": "^3.0.3" }

Can you please resolve this issue?

As a temporary solution I have rolled back to 1.6.1.

Thanks.

darrinsworlds avatar Apr 14 '24 15:04 darrinsworlds

Same issue here

FjellOverflow avatar Apr 22 '24 09:04 FjellOverflow

same issue

ecemozturk avatar May 08 '24 18:05 ecemozturk

Try to import it in the following way:

“vue3-perfect-scrollbar/style.css”.

It worked like this for me.

adrianmartinm avatar May 10 '24 11:05 adrianmartinm

@adrianmartinm thanks, that worked for me, changing in main.ts:

import { PerfectScrollbarPlugin } from 'vue3-perfect-scrollbar'; import 'vue3-perfect-scrollbar/style.css';

Also changed the import of PerfectScrollbar cause it's no longer default export. Readme was updated this way also

Boardtale avatar May 17 '24 18:05 Boardtale

for me, this solution is not working this is my error if this helps :

file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:21445 function e(e,n,r){throw new Error(r?No known conditions for "${n}" specifier in "${e}" package:Missing "${n}" specifier in "${e}" package)}function n(n,i,o,f){let s,u,l=r(n,o),c=function(e){let n=new Set(["default",...e.conditions||[]]);return e.unsafe||n.add(e.require?"require":"import"),e.unsafe||n.add(e.browser?"browser":"node"),n}(f||{}),a=i[l];if(void 0===a){let e,n,r,t;for(t in i)n&&t.length<n.length||("/"===t[t.length-1]&&l.startsWith(t)?(u=l.substring(t.length),n=t):t.length>1&&(r=t.indexOf("",1),~r&&(e=RegExp("^"+t.substring(0,r)+"(.)"+t.substring(1+r)).exec(l),e&&e[1]&&(u=e[1],n=t))));a=i[n];}return a||e(n,l),s=t(a,c),s||e(n,l,1),u&&function(e,n){let r,t=0,i=e.length,o=/[*]/g,f=/[/]$/;for(;t<i;t++)e[t]=o.test(r=e[t])?r.replace(o,n):f.test(r)?r+n:r;}(s,u),s}function r(e,n,r){if(e===n||"."===n)return ".";let t=e+"/",i=t.length,o=n.slice(0,i)===t,f=o?n.slice(i):n;return "#"===f[0]?f:o||!r?"./"===f.slice(0,2)?f:"./"+f:f}function t(e,n,r){if(e){if("string"==typeof e)return r&&r.add(e),[e];let i,o;if(Array.isArray(e)){for(o=r||new Set,i=0;i<e.length;i++)t(e[i],n,o);if(!r&&o.size)return [...o]}else for(i in e)if(n.has(i))return t(e[i],n,r)}}function o(e,r,t){let i,o=e.exports;if(o){if("string"==typeof o)o={".":o};else for(i in o){"."!==i[0]&&(o={".":o});break}return n(e.name,o,r||".",t)}}function f(e,r,t){if(e.imports)return n(e.name,e.imports,r,t)} ^

Error: Missing "./dist/vue3-perfect-scrollbar.min.css" specifier in "vue3-perfect-scrollbar" package at e (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:21445:25) at n (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:21445:627) at o (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:21445:1297) at resolveExportsOrImports (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:28746:20) at resolveDeepImport (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:28765:31) at tryNodeResolve (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:28453:20) at Context.resolveId (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:28212:28) at Object.resolveId (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:44276:64) at async Object. (file:///var/www/golddate/app/FrontEndtest/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:65937:21)

Node.js v21.1.0

ahronmoshe avatar Jul 05 '24 16:07 ahronmoshe