Issue with mobx and SystemJs in 3.1.0
See original GitHub issueTrying to upgrade from 2.7 to 3.1. The only way I’ve been able to get it to work is to include mobx and ng2-mobx in my systemjs.config.js like this:
var map = {
...
'angular2-tree-component': 'angular2-tree-component/dist/angular2-tree-component.umd.js',
'ng2-mobx': 'ng2-mobx/dist',
'mobx': 'mobx/lib'
};
var packages = {
...
'ng2-mobx': { main: 'ng2-mobx.umd.js', defaultExtension: 'js' },
'mobx': { main: 'mobx.umd.js', defaultExtension: 'js' }
};
Without this, I get the following ZoneAwareError when starting up (in this stack trace, folder-tree.component is my component which is doing this import: import { TreeComponent, TreeNode, ITreeOptions, IActionMapping, TreeModel, TREE_ACTIONS } from 'angular2-tree-component';
)
"Unexpected token <
Evaluating http://localhost:3000/ng2-mobx
Evaluating http://localhost:3000/client/app/project/folder-tree.component.js
Evaluating http://localhost:3000/client/app/project/project-view.component.js
Evaluating http://localhost:3000/client/app/app.routes.js
Evaluating http://localhost:3000/client/app/app.module.js
Evaluating http://localhost:3000/client/app/main.js
Loading app"
Not sure if I’m doing something wrong, or if there’s an issue with the component.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Issue with mobx and SystemJs in 3.1.0 #210 - GitHub
Trying to upgrade from 2.7 to 3.1. The only way I've been able to get it to work is to include mobx and...
Read more >mobx/CHANGELOG.md - UNPKG
1, # 3.3.1. 2. 3, * Fix bug allowing maps to be modified outside actions when using strict mode, fixes [#940](https://github.com/mobxjs/mobx/issues/940).
Read more >mobx-react-lite | Yarn - Package Manager
Lightweight React bindings for MobX based on React 16.8+ and Hooks ... This is a lighter version of mobx-react which supports React functional...
Read more >Importing observer from mobx-react causes "Uncaught ...
import mobxReact from 'mobx-react'; const { observer } = mobxReact;. Everything seems to work fine now. The issue seems to lie with babelify ......
Read more >mobx-react @ 5.1.2 .. 5.4.4 - Package Diff
Fixes [#579](https://github.com/mobxjs/mobx-react/issues/579) through ... resolved "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz# ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, please use 3.2.3. Version 3.2.2 had a problem with lodash-es
Yes you can ignore that warning for now, but I will solve it some day…