svg?sprite Cannot find module svg-baker-runtime/symbol.js
See original GitHub issueThanks for your awesome library!
Unfortunately I’m unable to get svg sprites working. After starting up the dev server it throws the following error:
Error: Cannot find module './node_modules/svg-baker-runtime/symbol.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:655:15)
at Function.Module._load (internal/modules/cjs/loader.js:580:25)
at Module.require (internal/modules/cjs/loader.js:711:19)
at require (internal/modules/cjs/helpers.js:14:16)
I set it up as written in the README.md on a new next.js project (using yarn create next-app
).
The file symbol.js
is in the correct folder inside node_modules/svg-baker-runtime
. Seems that the relative path to node_modules
is wrong?
Any ideas?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How fix cannot find module 'svg-baker-runtime/symbol' in svg ...
I use svg-sprite-loader for one folder in project, so i have such config: module: { rules: [ { test: /\.(gif|png|jpg|jpeg|svg|ico)$/, ...
Read more >svg-sprite-loader - npm
Webpack loader for creating SVG sprites. Latest version: 6.0.11, last published: a year ago. Start using svg-sprite-loader in your project ...
Read more >svg-sprite-loader | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >electron-vue使用svg图标_zqian1994的博客
Cannot find module 'svg-baker-runtime/symbol'. 1. 解决办法:参考使用Vue(svg-sprite-loader、vue2-svg-icon)重构svg管网监控图.
Read more >Cannot find module 'caniuse-lite/data/features/css-unicode-bidi
Trying to run a next project for the first time, but i'm getting this error, and I can't find anything on google…
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like this bug was introduced by version
4.1.4
ofsvg-sprite-loader
which was released a few days ago. You can go back to4.1.3
withnpm install svg-sprite-loader@4.1.3
until I figure out if next-optimized-images does something wrong or if it is indeed a bug in the sprite loader.The issue is fixed in svg-sprite-loader@5.0.0.