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.

Version 1.0 - How to set up the mappings? (Transpile error)

See original GitHub issue

I’m trying to upgrade to the newer versions of everything Apollo/GraphQL.

Here’s package.json versions

    "apollo-angular": "^1.0.0",
    "apollo-angular-link-http": "^1.0.0",
    "apollo-client": "^2.0.2",
    "apollo-cache-inmemory": "^1.1.0",
    "apollo-link": "^1.0.0",
    "apollo-link-ws": "^1.0.0",
    "apollo-link-core": "^0.5.4",
    "apollo-link-context": "^1.0.0",
    "apollo-link-error": "^1.0.0",

but at startup of the Angular 2 application I get the following:

zone.js:392 Error: Unable to dynamically transpile ES module
   A loader plugin needs to be configured via `SystemJS.config({ transpiler: 'transpiler-module' })`.
  Instantiating http://localhost:3000/node_modules/apollo-angular/index.js
  Loading http://localhost:3000/app/app.module.js
  Loading app/main
    at transpile (instantiate.js:467)
    at instantiate.js:245
    at ZoneDelegate.invoke (zone.js:392)
    at Zone.run (zone.js:142)
    at zone.js:873
    at ZoneDelegate.invokeTask (zone.js:425)
    at Zone.runTask (zone.js:192)
    at drainMicroTaskQueue (zone.js:602)
    at <anonymous>

It doesn’t seem to matter if I set tsconfig.json to compile to ES6 (was ES5), and I’ve tried multiple Babel setups as well to no avail. My systemjs.config mappings look like:

        'apollo-angular': {main: 'index.js', defaultExtension: 'js'},
        'apollo-angular-link-http': {main: 'index.js', defaultExtension: 'js'},
        'apollo-client': {main: 'index.js', defaultExtension: 'js'},
        'apollo-link': {main: 'lib/index.js', defaultExtension: 'js'},
        'apollo-link-ws': {main: 'lib/webSocketLink.js', defaultExtension: 'js'},
        'apollo-link-core': {main: 'lib/index.js', defaultExtension: 'js'},
        'apollo-link-context': {main: 'lib/bundle.umd.js', defaultExtension: 'js'},
        'apollo-link-error': {main: 'lib/bundle.umd.js', defaultExtension: 'js'},
        'apollo-cache-inmemory': {main: 'lib/index.js', defaultExtension: 'js'},

Anyone have any ideas what I’m missing?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
crumhorncommented, Nov 16, 2017

@kamilkisiela all good, close it

1reaction
kamilkisielacommented, Nov 15, 2017

Also thanks to apollographql/apollo-client#2466 packages like apollo-cache, apollo-utilites and others would be super easy too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript transpile errors appear only on production server
I am cloning my repo during the deploy process so I can't do this unless I include my build in my repo. Switch...
Read more >
qiskit.compiler.transpile
Transpilation is done in parallel using multiprocessing. If set, transpiler options are automatically grabbed from backend. configuration() and backend. ...
Read more >
immer source filenames are missing from V5.1.0 sourcemaps
The user-facing result of the missing mappings is that original source won't be shown in debuggers like Chrome or VSCode. If users step...
Read more >
How to transpile ES modules with webpack and Node.js
Learn how webpack interacts with and supports ES modules in this deep dive tutorial on transpilation in Node.js.
Read more >
ts-node - npm
TypeScript Node. NPM version NPM downloads Build status Test coverage. TypeScript execution and REPL for node.js, with source map and native ...
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