GithubHelp home page GithubHelp logo

Comments (8)

deangibson89 avatar deangibson89 commented on September 26, 2024 40

Just mentioning here that I got this as well when I tried to import observable from mobx-react. When I changed it to just mobx it worked. i.e.: import { observable } from 'mobx';

from babel-plugin-transform-decorators-legacy.

andreyluiz avatar andreyluiz commented on September 26, 2024 26

Guys, I've created another repo.

As @Tiwaz89 said, the imports are wrong.

@observable and @computed belongs to mobx package (it's obvious).
@observer belongs to the mobx-react package.

MobX documentation for @observable, @computed and @observer are very clear and brings an example right in the top of the article.

from babel-plugin-transform-decorators-legacy.

jhchill666 avatar jhchill666 commented on September 26, 2024 3

@andreyluiz did you figure this out? stuck on exactly the same issue and haven't a clue whats going on

from babel-plugin-transform-decorators-legacy.

loganfsmyth avatar loganfsmyth commented on September 26, 2024 1

@computed does not exist, did you forget to import it? https://github.com/andreyluiz/expert-invention/blob/master/app/js/root.js#L6

from babel-plugin-transform-decorators-legacy.

andreyluiz avatar andreyluiz commented on September 26, 2024

Right. Computed is not declared. But even if I import it the error persists. And if it was something about undeclared dependency, webpack would scream during the compilation, right?

from babel-plugin-transform-decorators-legacy.

loganfsmyth avatar loganfsmyth commented on September 26, 2024

Not necessarily. You are using Babel's module processing, not Webpack 2's, and Babel doesn't know how files relate to eachother.

The error itself means something that you've passed via @<some-decorator> is not a function.

from babel-plugin-transform-decorators-legacy.

andreyluiz avatar andreyluiz commented on September 26, 2024

Hmm, that's weird. I'll close it for now. I'm still not able to run it but I know the problem is something related with my imports or dependencies. Thank you for the help. :)

from babel-plugin-transform-decorators-legacy.

andreyluiz avatar andreyluiz commented on September 26, 2024

Ah, sorry guys. I've deleted the repo. But I will create a new simulation and give another try. If it works okay I close this issue. :)

from babel-plugin-transform-decorators-legacy.

Related Issues (20)

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.