-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot find module 'svg-baker-runtime/symbol' #186
Comments
I had a similar problem with |
@pSHCH @draperunner still reproduces with latest version? |
@pSHCH @draperunner ping |
I can't reproduce the issue with version 3.2.4, 3.2.5, nor 3.2.6. Maybe |
Probably it was error while publishing an 3.2.4 version. Closing this one. |
I'm seeing this issue at 3.4.1 :( |
@dvkndn could you please create repo with minimal setup to demonstrate a problem (package.json, webpack config, SVG image and piece of your code). If you don't want to create a repository - you can create a gist with multiple files. Also it will be useful if you provide name of your package manager and it's version. |
I'm seeing the error too. Error was only occurring when running Edit: looks like it was between |
@pSHCH @draperunner @dvkndn @derrickpelletier I can help you only if anyone of you guys demonstrate this error in git repo/gist. I need only package.json with lock npm/yarn file, webpack config and small piece of your code. |
Hello @kisenka, I tried the last v and still have problems. So, my template the same (component in UI-KIT and it using in other projects, see my first message). So, my kit config (https://gist.github.com/pSHCH/ec32a422959f2cb73119e9a7e4b6cb7a) and everything ok, I see my svg icons. Then I use UI-KIT in other project like submodule. My config in other project: https://gist.github.com/pSHCH/927318b70c2fc1edb9e559d1e6576573 and package.json in this project: https://gist.github.com/pSHCH/2ba50e417b81f52c4b2985dbd5821c43 Resalt:
|
@pSHCH thanks for response. I have no time to setup project manually I don't know what UI-KIT is and how you use sprite loader as submodule. Could you please setup project, where I can run npm script and have an error? |
@kisenka sorry, I can't. So, if I move component (svg icons) from submodule to project - it works ok. If i use component from submodule - I have error. So, I can make test project to show it at weekend. |
@pSHCH will be great! |
@pSHCH didn't you find a way to make it work from submodules? |
Was facing this issue with version
|
Can confirm @sunil-jhamnani solution is working. |
Still doesn't work on 4.2.5. |
@kisenka I'm not sure that the gist is needed. |
@semirart I'm ready to help, but I need minimal setup next.js project with svg-sprite-loader where error occurs. |
@kisenka Thank you! Here's the repo. You can bootstrap it like this:
To run the project:
|
@semirart I'm getting following error: |
@kisenka Sorry, forgot to add all files. I've updated the repo, you can try it again. |
Fixed in |
BREAKING CHANGE: Possible breaks third-party runtime generators. Earlier `context` param was containing _path to compilation root context_, e.g. folder where webpack compilation occurs. This is wrong behaviour, because meaning of this param is a _folder where svg image is located_. So it was changed in this commit. If your custom runtime generator breaks after this update use `loaderContext.rootContext` option instead of `context`. Closes: #186
@kisenka I confirm, that the issue is resolved in 5.0.0. Thank you! |
Do you want to request a feature, report a bug or ask a question?
Ask a question
What is the current behavior?
Error: Cannot find module 'svg-baker-runtime/symbol'
I have submodule (kit for component) and main project. I tested svg-sprite-loader in kit and it was ok. Then I added this rules to main project ( https://gist.github.com/pSHCH/cb03ff5469df85439f4fe42969430330 ).
My component in kit:
and use at page:
<Icon type='user'/>
What is the expected behavior?
If the current behavior is a bug, please provide the steps to reproduce, at least part of webpack config with loader configuration and piece of your code.
The best way is to create repo with minimal setup to demonstrate a problem (package.json, webpack config and your code).
It you don't want to create a repository - create a gist with multiple files
If this is a feature request, what is motivation or use case for changing the behavior?
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
The text was updated successfully, but these errors were encountered: