question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

svg?sprite Cannot find module svg-baker-runtime/symbol.js

See original GitHub issue

Thanks 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:open
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
cyrilwannercommented, May 20, 2019

It looks like this bug was introduced by version 4.1.4 of svg-sprite-loader which was released a few days ago. You can go back to 4.1.3 with npm 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.

2reactions
semirartcommented, May 13, 2020

The issue is fixed in svg-sprite-loader@5.0.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found