codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.08k stars 2.28k forks source link

React scripts is not found on cdn.jsdelivr.net #785

Closed borm closed 6 years ago

borm commented 6 years ago

Steps to reproduce

  1. go to codesandbox
  2. choose create new react box

image

lbogdan commented 6 years ago

Hey @borm , thank you for the report!

This error is expected (it's a feature, not a bug :slightly_smiling_face: ), and it's caused by monaco-editor, the default editor used by CodeSandbox, as it tries to load TypeScript definition files (notice the .d.ts extension, also the definitions are, by default, found in a separate typings package named @types/package-name) for the packages used by the sandbox, and the react-scripts package has no such typings.

If you try switching to the other editor available in CS, CodeMirror, you'll see the error go away, because it doesn't have this feature.

lbogdan commented 6 years ago

You can also turn off the automatic download of typings using the "Automatic Type Acquisition" setting in your preferences.

borm commented 6 years ago

Hey, okay, can you set CodeMirror as default editor until the error with monaco is eliminated?

And if you can, please show me where i can change default editor

CompuIves commented 6 years ago

Note that that error message is only to notify the user, it doesn't change behavior since it's caught. I'm not sure if it makes sense to change the editor for a console.error statement.

You can change the editor in preferences, you can find preferences in the header under your user menu.

On Wed, May 2, 2018, 10:34 borm notifications@github.com wrote:

Hey, okay, can you set CodeMirror as default editor until the error with monaco is eliminated?

And if you can, please show me where i can change default editor

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CompuIves/codesandbox-client/issues/785#issuecomment-386058671, or mute the thread https://github.com/notifications/unsubscribe-auth/AAj1CHohAi7rSLTHVZazIOrNndbeaPl-ks5tue4qgaJpZM4Tvf67 .

borm commented 6 years ago

image

What wrong? https://codesandbox.io/s/4xq2qpzw79