question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with mobx and SystemJs in 3.1.0

See original GitHub issue

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 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
adamkleingitcommented, Mar 8, 2017

Sorry, please use 3.2.3. Version 3.2.2 had a problem with lodash-es

0reactions
adamkleingitcommented, Apr 4, 2017

Yes you can ignore that warning for now, but I will solve it some day…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found