swagger-editor icon indicating copy to clipboard operation
swagger-editor copied to clipboard

Error when trying to launch a project for local development

Open xzdwq opened this issue 1 year ago • 3 comments

Q&A (please complete the following information)

  • OS: windows 10
  • Browser: chrome
  • Version: 130
  • Method of installation: npm
  • Swagger-Editor version: 5.0.0-alpha.96

Content & configuration

I am trying to run swagger-editor-next locally I followed the startup instructions:

 $ git submodule init
 $ git submodule update
 $ npm i
 $ npm start

and I got an error:

ERROR in ./src/plugins/editor-monaco/components/MonacoEditor/MonacoEditor.jsx 8:0-40
Module not found: Error: You attempted to import /node_modules/monaco-editor which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.

I also checked:

npm ls monaco-editors

[email protected] C:\Users\zhivovi\develop\swagger-editor
+-- monaco-editor@npm:@codingame/[email protected]
`-- [email protected] -> .\create-react-app\packages\react-scripts
  `-- monaco-editor@npm:@codingame/[email protected] deduped

And I tried npm dedupe but the mistake remained the same

I know that these are the features of react-create-app, but I'm not sure that I should somehow solve this through overrides

Screenshots

image

image

xzdwq avatar Nov 12 '24 10:11 xzdwq

I'm having the same issue, any ideas?

monkmachine avatar Apr 23 '25 15:04 monkmachine

I'm having the same issue, any ideas?

I have my own version of this project in which I fixed all the problems I had. I also added zustand and connected it to the code editor for better interaction. you can try using it if it helps you. https://github.com/xzdwq/swagger-editor

xzdwq avatar Apr 24 '25 11:04 xzdwq

I'm having the same issue, any ideas?

I have my own version of this project in which I fixed all the problems I had. I also added zustand and connected it to the code editor for better interaction. you can try using it if it helps you. https://github.com/xzdwq/swagger-editor

Thank you so much for this!

monkmachine avatar Apr 25 '25 08:04 monkmachine

We’ve released Swagger Editor v5! 🎉 Check out the details here: Inside the New Swagger Editor. We’re closing old issues related to previous versions. If you think any of them are still relevant, please open a new issue – this helps us prioritize what matters most. Thanks for your activity! 🚀

MichakrawSB avatar Dec 05 '25 14:12 MichakrawSB