Comments (8)
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.
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.
@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.
@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.
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.
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.
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.
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)
- Error: Cannot read property of undefined. Static properties HOT 4
- @observable static has a Error
- Extract decorated functions as top level variables HOT 7
- Class property decorator hack. HOT 4
- What can be done to make decorators real in and move from stage-1 to stage-4? HOT 4
- [bug]Parameter Decorator does not work HOT 2
- About the parameter decorator support HOT 1
- Hook into initializer HOT 3
- Class property decorators gets applied before the class decorator itself HOT 4
- Issues with Electron HOT 19
- undefined is not a constructor (evaluating 'new u') HOT 2
- plugin not working HOT 4
- A issue in React-Native HOT 3
- Incorrect local name w/ native classes & babel-minify
- Maximum call stack size exceeded
- Clarify what babel's `legacy: true` is for exactly HOT 1
- Module build failed : Error:Cannot use the decorators and decorators-legacy plugin together
- Module parse failed: Unexpected character '@' (15:0)
- Audit vulnerabilities detected in the babelplugintransformdecoratorslegacy project on Tag: v1.3.5
- No lock file found in the babelplugintransformdecoratorslegacy project on Tag: v1.3.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-transform-decorators-legacy.