Giter VIP home page Giter VIP logo

styled-jsx-demo's Introduction

Babel compile step throws an exception trying to create source maps. It appears the styled-jsx/babel plugin isn't given exactly the data it expects.

ERROR in ./src/index.tsx
Module build failed (from ./node_modules/awesome-typescript-loader/dist/entry.js):
TypeError: Cannot read property 'indexOf' of undefined
    at Object.relative (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\styled-jsx\node_modules\source-map\lib\util.js:262:16)
    at SourceMapGenerator.setSourceContent (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\styled-jsx\node_modules\source-map\lib\source-map-generator.js:140:21)
    at makeSourceMapGenerator (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\styled-jsx\dist\_utils.js:383:13)
    at processCss (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\styled-jsx\dist\_utils.js:484:21)
    at PluginPass.exit (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\styled-jsx\dist\babel.js:220:51)
    at newFn (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\@babel\traverse\lib\visitors.js:193:21)
    at NodePath._call (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\@babel\traverse\lib\path\context.js:53:20)
    at NodePath.call (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\@babel\traverse\lib\path\context.js:40:17)
    at NodePath.visit (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\@babel\traverse\lib\path\context.js:97:8)
    at TraversalContext.visitQueue (C:\Users\peping\WebstormProjects\styled-jsx-demo\node_modules\@babel\traverse\lib\context.js:118:16)
 @ multi ./src main[0]

Steps to reproduce:

  1. clone this repo
  2. npm install or yarn install
  3. npm start or yarn start

Workaround

To make this project work, disable styled-jsx's source maps by uncommenting line .babelrc:9

styled-jsx-demo's People

Watchers

Teri Hornych avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.