Closed jayantisuthar closed 6 months ago
i am also getting the same issue, previously 5.0.5 was working but now it's is showing above error
i also tried to use 5.0.7 but same issue
On my end, changing the package.json line to
"vue-sweetalert2": "5.0.5",
solved the issue. But this repo indeed doesn't seem to be the right one. Somehow https://www.npmjs.com/package/vue-sweetalert2 points to it, but the tags are not here.
It worked for me with the old package-lock.json file but with new generated package-lock.json it's not working for both version, 5.0.5 and 5.0.7
@avil13 Maybe some of the tags were deleted from the github?
+1 on this issue
"dependencies": { "vue": "^3.4.21", "vue-sweetalert2": "^5.0.7" },
I don't know why but doing this worked for me
"vue-sweetalert2": "^5.0.5" --> "vue-sweetalert2": "5.0.5"
The problem was in the exports you needed for your versions of NodeJs. The problem has been fixed.
P.S.. @osmanyasircankaya Your hack works because the “^” in “^5.0.5”, allows you to update the patch version. By removing this character you are specifying a strictly defined version.
/*
Error: [commonjs--resolver] Failed to resolve entry for package "vue-sweetalert2". The package may have incorrect main/module/exports specified in its package.json. at packageEntryFailure (file:///codebuild/output/src871624166/src/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48264:17) at resolvePackageEntry (file:///codebuild/output/src871624166/src/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48261:5) at tryNodeResolve (file:///codebuild/output/src871624166/src/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48031:20) at Object.resolveId (file:///codebuild/output/src871624166/src/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:47781:28) at file:///codebuild/output/src871624166/src/node_modules/rollup/dist/es/shared/node-entry.js:19778:40 at async PluginDriver.hookFirstAndGetPlugin (file:///codebuild/output/src871624166/src/node_modules/rollup/dist/es/shared/node-entry.js:19678:28) at async resolveId (file:///codebuild/output/src871624166/src/node_modules/rollup/dist/es/shared/node-entry.js:18359:26) at async ModuleLoader.resolveId (file:///codebuild/output/src871624166/src/node_modules/rollup/dist/es/shared/node-entry.js:18762:15) at async Object.resolveId (file:///codebuild/output/src871624166/src/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:8247:10) at async PluginDriver.hookFirstAndGetPlugin (file:///codebuild/output/src871624166/src/node_modules/rollup/dist/es/shared/node-entry.js:19678:28)
*/
I am getting this error while deploying on the server.
I am getting this error for both version 5.0.7 and 5.0.5 https://www.npmjs.com/package/vue-sweetalert2
Can you please resolve this ASAP.
I can see the NPM package repository is showing 3 hours ago updated but git repository is not showing anything like this.