Skip to content

fix: solve 404 error by better resolving of path to studio - #489

Merged
asyncapi-bot merged 5 commits into
asyncapi:masterfrom
derberg:fixstudio404
Apr 6, 2023
Merged

asyncapi-bot merged 5 commits into
asyncapi:masterfrom
derberg:fixstudio404

Conversation

@derberg

@derberg derberg commented Mar 27, 2023

Copy link
Copy Markdown
Member

Fixes #244

Continuation of #332 that initial contributor was not interested to continue

@derberg

derberg commented Apr 6, 2023

Copy link
Copy Markdown
Member Author

@Souvikns can you have a look?

@sonarqubecloud

sonarqubecloud Bot commented Apr 6, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Comment thread src/models/Studio.ts
//not all CLI users use npm. Some package managers put dependencies in different weird places
//this is why we need to first figure out where exactly is the index.html located
//and then strip index.html from the path to point to directory with the rest of the studio
const indexLocation = require.resolve('@asyncapi/studio/build/index.html');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking for a global install studio right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for any closest
so if you use CLI as local dependency, this one will be picked up

@derberg

derberg commented Apr 6, 2023

Copy link
Copy Markdown
Member Author

/rtm

@asyncapi-bot
asyncapi-bot merged commit a33f901 into asyncapi:master Apr 6, 2023
@derberg
derberg deleted the fixstudio404 branch April 6, 2023 08:39
@asyncapi-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.37.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio 404 not found

3 participants