From 49929a8b6e1cce4d7c50965ea1f7b4aa1619ea3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatriz=20Sopen=CC=83a=20Merino?= Date: Tue, 18 Jul 2023 11:35:56 +0200 Subject: [PATCH] BUGFIX. Error in the `svg-symbol-sprite-loader` package when starting the application Error: - INFO Starting development server... [9%] setup (compilation SVGSymbolSprite) (node:65089) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tapAsync' of undefined at /Applications/MAMP/htdocs/vue-users/node_modules/svg-symbol-sprite-loader/src/plugin.js:89:59 at Hook.eval [as call] (eval at create (/Applications/MAMP/htdocs/vue-users/node_modules/tapable/lib/HookCodeFactory.js:19:10), :251:1) at Hook.CALL_DELEGATE [as _call] (/Applications/MAMP/htdocs/vue-users/node_modules/tapable/lib/Hook.js:14:14) at Compiler.newCompilation (/Applications/MAMP/htdocs/vue-users/node_modules/webpack/lib/Compiler.js:1126:26) at /Applications/MAMP/htdocs/vue-users/node_modules/webpack/lib/Compiler.js:1170:29 at Hook.eval [as callAsync] (eval at create (/Applications/MAMP/htdocs/vue-users/node_modules/tapable/lib/HookCodeFactory.js:33:10), :40:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Applications/MAMP/htdocs/vue-users/node_modules/tapable/lib/Hook.js:18:14) at Compiler.compile (/Applications/MAMP/htdocs/vue-users/node_modules/webpack/lib/Compiler.js:1165:28) at /Applications/MAMP/htdocs/vue-users/node_modules/webpack/lib/Watching.js:218:19 at _next2 (eval at create (/Applications/MAMP/htdocs/vue-users/node_modules/tapable/lib/HookCodeFactory.js:33:10), :27:1) (Use `node --trace-warnings ...` to show where the warning was created) (node:65089) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:65089) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Reason: - After upgrading the `Vue CLI` packages from v.4 to v.5 and trying to launch the application with `npm run serve` an error occurs in the terminal related to the `svg-symbol-sprite-loader` package. Version 4.0.0 of `svg-symbol-sprite-loader` may not be compatible with `Vue CLI 5. There may be changes or incompatibilities in the way `Vue CLI 5` handles SVG loads and load modules. Solution: - Upgrade the `svg-symbol-sprite-loader` package from v.4 to v.5 --- package-lock.json | 70 +++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 45 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index c4d64d84..ddf535fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2990,8 +2990,7 @@ "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" }, "binary-extensions": { "version": "2.2.0", @@ -3283,6 +3282,14 @@ "parse5": "^5.1.1", "parse5-htmlparser2-tree-adapter": "^6.0.0", "yargs": "^16.0.0" + }, + "dependencies": { + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + } } }, "cli-spinners": { @@ -4129,8 +4136,7 @@ "emojis-list": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, "encodeurl": { "version": "1.0.2", @@ -5720,7 +5726,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -5730,8 +5735,7 @@ "json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" } } }, @@ -6605,9 +6609,9 @@ } }, "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" }, "parse5-htmlparser2-tree-adapter": { "version": "6.0.1", @@ -6616,14 +6620,6 @@ "dev": true, "requires": { "parse5": "^6.0.1" - }, - "dependencies": { - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - } } }, "parseurl": { @@ -7609,6 +7605,11 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, + "safe-require": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/safe-require/-/safe-require-1.0.4.tgz", + "integrity": "sha512-1elAbSH1u7HVMfbuqktLWAN0wMOeT+FnJVqMhBgEJLvL95m+KT433tiJdGMV1e3TstQXRt1YrKQDRBu0Kpk4WA==" + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -7947,6 +7948,11 @@ "websocket-driver": "^0.7.4" } }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -8374,11 +8380,14 @@ "dev": true }, "svg-symbol-sprite-loader": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/svg-symbol-sprite-loader/-/svg-symbol-sprite-loader-4.0.0.tgz", - "integrity": "sha512-vNpcbfCQL4dPIWeXEuAWZ5X4o3UYcWVeMoGr962faPFS+vboz0VTP2kJWcelrWCffGcd2kI6yWMvr6vGSy2YLw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/svg-symbol-sprite-loader/-/svg-symbol-sprite-loader-5.1.0.tgz", + "integrity": "sha512-Kq66TtVs4DHJv/CL3XEJDu+0oeAm20c/YkJRz9NQMzsjd9dDxt1BZ/vuMuECw6b6DX6Kcd5VF0nWBk3bWW3gmg==", "requires": { - "parse5": "5" + "loader-utils": "2", + "parse5": "6", + "safe-require": "1", + "webpack-sources": "2" } }, "svg-tags": { @@ -8999,6 +9008,12 @@ "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true } } }, @@ -9188,10 +9203,13 @@ } }, "webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.1.tgz", + "integrity": "sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==", + "requires": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + } }, "webpack-virtual-modules": { "version": "0.4.6", diff --git a/package.json b/package.json index 77dc0105..4154c10f 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "google-maps-api-loader": "^1.1.1", "leaflet": "^1.9.4", "node-emoji": "^1.11.0", - "svg-symbol-sprite-loader": "^4.0.0", + "svg-symbol-sprite-loader": "^5.1.0", "vue": "^2.7.14", "vue-router": "^3.6.5", "vue2-leaflet": "^2.7.1"