-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
fix: studio 404 not found #332
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@to-kr sorry for jumping into review with such delay 😞
thanks for trying to fix the issue, but I'm not 100% sure it is the best we can do. It is still kinda hacky to have hardcoded paths
could you try to use require.resolve
to dynamically check where @asyncapi/studio
is located?
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
const studioBuildFolder = existsSync(resolve(__dirname, '../../node_modules/@asyncapi/studio/build')) ? | ||
resolve(__dirname, '../../node_modules/@asyncapi/studio/build') : | ||
resolve(__dirname, '../../../../@asyncapi/studio/build'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const studioBuildFolder = existsSync(resolve(__dirname, '../../node_modules/@asyncapi/studio/build')) ? | |
resolve(__dirname, '../../node_modules/@asyncapi/studio/build') : | |
resolve(__dirname, '../../../../@asyncapi/studio/build'); | |
const studioBuildFolder = require.resolve('@asyncapi/studio/build/index.html'); |
this should be universal solution. Works on my side, npm user.
wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@to-kr do you plan to continue with this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't catch your previous answer. Your solution looks good. Please fix it yourself.
closing in favour of #489 |
Conditional resolve of Studio Build depending on installation type.
Related issue(s)
Resolves #244