Cannot resolve Playground
See original GitHub issueHey! I’ve followed the tutorial to implement snapguidist on my react-styleguidist but I’m gettint the following error when I run the start script:
FAIL Failed to compile
./node_modules/react-styleguidist/lib/rsg-components/Playground/index.js
Module not found: Can't resolve 'rsg-components/Playground/Playground' in '/<path-to-project>/node_modules/react-styleguidist/lib/rsg-components/Playground'
Here’s the alias
part of the loaded webpackconfig:
{ entry:
[ '/<path-to-project>/packages/css-packs/core-styles/src/index.scss',
'/<path-to-project>/node_modules/react-styleguidist/lib/index',
'/<path-to-project>/node_modules/react-dev-utils/webpackHotDevClient.js',
'!!style-loader!css-loader!codemirror/lib/codemirror.css',
'!!style-loader!css-loader!rsg-codemirror-theme.css',
'!!style-loader!css-loader!/<path-to-project>/node_modules/snapguidist/lib/styles.css' ],
output:
{ path: '/<path-to-project>/styleguide',
filename: 'build/[name].bundle.js',
chunkFilename: 'build/[name].js' },
resolve:
{
extensions:
[
'.js',
'.jsx',
'.json',
'.js',
'.jsx',
'.ts',
'.tsx',
'.json',
'.less',
'.scss',
'.sass',
'.styl',
'.css'
],
alias: {
'rsg-components/Playground/PlaygroundRenderer': 'react-styleguidist/lib/rsg-components/Playground/PlaygroundRenderer',
'rsg-components/Playground': '/<path-to-project>/node_modules/snapguidist/lib/components/Playground',
'rsg-components/Preview': '/<path-to-project>/node_modules/snapguidist/lib/components/Preview',
'rsg-codemirror-theme.css': 'codemirror/theme/base16-light.css',
react: 'preact-compat',
'react-dom': 'preact-compat',
'rsg-components': '/<path-to-project>/node_modules/react-styleguidist/lib/rsg-components'
},
modules: [ './node_modules' ] }
...
}
(I’ve used <path-to-project>
here just to shorten the output)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
Playground can't find symbols in s… | Apple Developer Forums
I have a set of playgrounds that I'm using with a with a private (Swift) framework that is hosted, alongside my app targets,...
Read more >swift playground can't find any type - Stack Overflow
I'm new to swift playground, and I tried to create a instance of Type like Scene or Graphic. But every time I try...
Read more >Why "error: cannot find 'Task' in scope" in Xcode Playground?
In Xcode Version 13.0 beta 3 (13A5192i), I just paste this example: @MainActor class Test { fileprivate var value: Int? func tryMe() {...
Read more >Can't find Trailhead Playground - Salesforce Developers
Can't find Trailhead Playground. This is my first day using this, and I have already run into an issue. So I am on...
Read more >lightning web components - Unable to Resolve UI-Card
This is mentioned in one of the issues of the repository. The ui-card is a base component and is not present in the...
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 Free
Top 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
Thank you very much, @kaisermann. It was due to https://github.com/styleguidist/react-styleguidist/commit/06a62e4b7b3c65e9669f5483a065478ebfb3e6b7, and it’s now fixed in v3.1.2.
Oops, my bad.
I’m using
preact
with the appropriatereact
alias, but snapguidist uses the fiber API whichpreact-compat
doesn’t provide: