I’m currently trying to run
yarn rw storybook
and it is throwing an error as follows:
It looks like there might be a path resolution error given the "can’t resolve ‘C:Codedropzonewebsrc’ " reference and the the project folder being “c:\code\dropzone”
FYI
System:
OS: Windows 10 10.0.18362
Binaries:
Node: 12.16.1 - ~\AppData\Local\Temp\yarn–1602164690238-0.29477213943128944\node.CMD
Yarn: 1.22.4 - ~\AppData\Local\Temp\yarn–1602164690238-0.29477213943128944\yarn.CMD
Browsers:
Chrome: 85.0.4183.121
Edge: Spartan (44.18362.449.0)
npmPackages:
@redwoodjs /core: ^0.19.2 => 0.19.2
Any help would be appreciated.
Thanks.
Hi @brettyp .
I’m on OSX so maybe have to ask someone like @Tobbe to confirm, but this:
export const command = 'storybook'
export const aliases = ['sb']
export const description =
'Launch Storybook, an isolated component development environment'
export const handler = () => {
const cmd = 'yarn start-storybook'
const cwd = getPaths().web.base
const staticAssetsFolder = path.join(getPaths().web.base, 'public')
// Create the `MockServiceWorker.js` file.
execa(`yarn msw init ${staticAssetsFolder}`, undefined, {
stdio: 'inherit',
shell: true,
cwd,
})
execa(
cmd,
might be an issue where the path wasn’t converted to a posix path:
/**
* Converts Windows-style paths to Posix-style
* C:\Users\Bob\dev\Redwood -> /c/Users/Bob/dev/Redwood
*
* The conversion only happens on Windows systems, and only for paths that are
* not already Posix-style
*
* @param path Filesystem path
*/
export const ensurePosixPath = (path: string) => {
let posixPath = path
if (process.platform === 'win32') {
if (/^[A-Z]:\\/.test(path)) {
const drive = path[0].toLowerCase()
posixPath = `/${drive}/${path.substring(3)}`
}
posixPath = posixPath.replace(/\\/g, '/')
}
Could you write up an issue
and someone can look to confirm it with Windows?
Thanks!
@Tobbe
Does the info above add any helpful information to this Issue + discussion:
Tobbe
October 8, 2020, 9:27pm
4
Thanks for looping me in here @thedavid and @dthyresson .
@brettyp As you can see from the issue @thedavid linked this has unfortunately been a known issue for a while. Thanks to @dthyresson ’s pointer I’ll do some digging tomorrow. Please post in the GH issue if you have any more info that you think might be relevant to share, or if you happen to make any kind of progress yourself.
1 Like
Tobbe
October 10, 2020, 4:49pm
5
@brettyp Just a heads up that a fix is in the works. PR here: https://github.com/redwoodjs/redwood/pull/1324
1 Like
brettyp
October 12, 2020, 10:07am
6
Thanks for letting me know
Awesome work getting that PR in @Tobbe That was a beast of an issue to diagnose.
We’re aiming to have Redwood v0.20.0 out this week, which will include this fix.