Skip to content

Commit

Permalink
BUGFIX. Error in the svg-symbol-sprite-loader package when starting…
Browse files Browse the repository at this point in the history
… 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), <anonymous>: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), <anonymous>: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), <anonymous>: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
  • Loading branch information
beatrizsmerino committed Jul 18, 2023
1 parent 0bd7a36 commit 49929a8
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 27 deletions.
70 changes: 44 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 49929a8

Please sign in to comment.