Search code examples
githubvue-cli-3codesandbox

Codesandbox and importing Github repos built with Vue-CLI: TypeError Cannot read property 'toString' of undefined


I have an app built using Vue-Cli and it works fine locally, however, when I import the code from Github into Codesandbox, I get the following error:

enter image description here

And I get squigly red line/error here:

enter image description here

Anyone know what I need to do to fix?

You can access the sandbox here: https://codesandbox.io/s/funny-greider-ri1w7?file=/src/components/PhotoDetail.vue


Solution

  • Remove the empty <style> tags in your components, seems like it doesn't play nicely with Codesandbox.

    Reference: https://github.com/codesandbox/codesandbox-client/issues/1912#issuecomment-492518145