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.

Bug on build with mergeDeep

See original GitHub issue

Intended outcome:

Here are version of packages that I’m using:

    "apollo-angular": "1.0.1",
    "apollo-angular-link-http": "1.0.1",
    "apollo-cache-inmemory": "1.3.9",
    "apollo-client": "2.4.5",
    "apollo-link": "1.2.3",
    "apollo-link-context": "1.0.9",
    "apollo-link-http": "1.5.5",

Actual outcome:

Running ng build produces

node_modules/apollo-utilities/lib/util/mergeDeep.d.ts(1,214): error TS1005: ',' expected.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
mattezellcommented, Mar 14, 2019

+1

Wanted to share my observations in case it assists others. A little back story: we have a large enterprise application codebase that was working, but seemingly breaks following running an ‘npm install’ - error is the reported deepMerge. We can’t currently migrate to Angular 7, and Angular 6 of course doesn’t support TypeScript 3… So we find ourselves having to find a workaround until we can tackle migration - which is unfortunate. I am sharing this in case it assists others to avoid wasting 2 days.

Our project’s relevant dependencies from package.json:

    "@angular/animations": "6.1.0",
    "@angular/cdk": "6.4.2",
    "@angular/common": "6.1.0",
    "@angular/compiler": "6.1.0",
    "@angular/core": "6.1.0",
    "@angular/elements": "6.1.7",
    "@angular/forms": "6.1.0",
    "@angular/http": "6.1.0",
    "@angular/platform-browser": "6.1.0",
    "@angular/platform-browser-dynamic": "6.1.0",
    "@angular/pwa": "0.8.0",
    "@angular/router": "6.1.0",
    "@angular/service-worker": "6.1.7",
    "apollo-angular": "1.5.0",
    "apollo-angular-link-http": "1.4.0",
    "apollo-cache-inmemory": "1.4.2",
    "apollo-client": "2.4.12",
    "apollo-link-error": "1.1.5",
    "apollo-link-retry": "2.2.8",
    "graphql": "14.1.1",
    "graphql-tag": "2.10.1"

Our project’s relevant dev dependencies from package.json:

    "@angular-devkit/build-angular": "0.6.8",
    "@angular-devkit/build-ng-packagr": "0.6.8",
    "@angular/cli": "7.3.0",
    "@angular/compiler-cli": "6.1.0"

Node/NPM:

node: v10.15.0
npm: 6.4.1

I’ve found two workarounds that get us building, though we have yet to do the testing that will be needed to vet if this is actually a workable solution (e.g. everything behaving at runtime)… In any case, either of the following will get us building again:

  • Remove all of the nested ‘\apollo-*\node_modules’ (many of the apollo libs have nested node_modules, mostly for the 3 apollo-utilities versions currently in play).
  • Replace the nested '\apollo-*\node_modules\apollo-utilities' with an older version (I’ve tested 1.0.22)

As mentioned, performing either of the above in our codebase results in a working build.

As mentioned, I’ve tracked down 3 versions of apollo-utilities at play within the various nested node_modules: 1.2.1, 1.0.22, 1.1.2.

For the interested, here is what I am seeing when I inspect the package-lock.json following npm install:

Packge: apollo-cache@1.2.1
Requires: apollo-utilities@^1.2.1
Resolved: apollo-utilities@1.2.1
------------
Packge: apollo-cache-inmemory@1.4.2
Requires: apollo-utilities@^1.1.2
Resolved: apollo-utilities@1.2.1
------------
Packge: apollo-client@2.4.12
Requires: apollo-utilities@^1.1.2
Resolved: apollo-utilities@1.1.2
------------
Packge: apollo-link@1.2.3
Requires: apollo-utilities@^1.0.0
Resolved: <No Dependencies Obj Present>
------------
Packge: apollo-link-dedup@1.0.16
Requires: apollo-link@^1.2.9 > apollo-utilities@^1.2.1
Resolved: apollo-utilities@1.2.1
------------
Packge: apollo-link-error@1.1.5
Requires: apollo-link@^1.2.9 > apollo-utilities@^1.2.1
Resolved: apollo-utilities@1.2.1
------------
Packge: apollo-link-http-common@0.2.11
Requires: apollo-link@^1.2.9 > apollo-utilities@^1.2.1
Resolved: apollo-utilities@1.2.1
------------
Packge: apollo-link-retry@2.2.8
Requires: apollo-link@^1.2.6 (resolves 1.2.9) > apollo-utilities@^1.2.1
Resolved: apollo-utilities@1.2.1
------------
Packge: apollo-utilities@1.0.22
Requires: <NA - This is top node_modules install>
Resolved: apollo-utilities@1.0.22
------------
4reactions
thekevinbrowncommented, Mar 8, 2019

@benjamn I’m seeing this error with typescript v3.3.3333.

Edit: Actually, I’m using Typescript v3.3.3333, but a package has a dependency instead of a peer dependency, pinning the version at 2.2. So it’s not actually running Typescript 3 for me:

https://github.com/prisma/serverless-plugin-typescript/blob/master/package.json

So, ignore this, it’s not actually happening in v3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ITP: mergedeep -- Deep merge function for Python
Bug #1006479: ITP: mergedeep -- Deep merge function for Python ... This package is a new build dependency for python-mkdocs and will be...
Read more >
2000350 – Review Request: python-mergedeep
Bug 2000350 ; 2021-09-01 22:48 UTC by Sandro Mani · 2021-09-13 08:25 UTC (History) · 3 users (show) · Doc Type: If docs...
Read more >
Debian Bug report logs - #1006479 ITP: mergedeep -- Deep merge ...
It provides various merge strategies (Replace, Additive, Typesafe replace, or Typesafe additive). This package is a new build dependency for python-mkdocs and ...
Read more >
immutable JS - immutable deep merge is overriding the object
We need a "mergeDeepFromTop". It makes no sense to me that you can mergeDeep as long as the objects you want to merge...
Read more >
ag-Grid mergeDeep createFinalParams bug repro - Plunker
... 'plugin-babel': 'npm:systemjs-plugin-babel@0.0.25/plugin-babel.js', 'systemjs-babel-build': 'npm:systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js' ...
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