-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug on build with mergeDeep #4506
Comments
Can you share a runnable reproduction? It's hard to guess what Angular might be complaining about, otherwise. |
Possibly related (not exactly the same error, but I suspect Angular's requirement of TypeScript 2 could be the root of your problems, too): #4475 |
I am also hitting this error suddenly...
|
@soniachan You're using a fairly old version of |
If you're not able to update |
I had the same issue with Angular global latest 7.x and local is 5.2.11. |
Upgrading Angular and typescript worked for me!! :) "@angular/core": "6.1.10", |
i get same error { |
This is still an issue |
@soniachan |
Folks, please read the existing comments before posting the same information again. Updating |
the error happen again today... i will try upgrade the versions again
|
@harishajdarevic I tried to set specific version of "apollo-link": "1.2.3", "apollo-utilities": "1.0.22", and it worked for me. Compiled without errors. |
@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. |
+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:
Our project's relevant dev dependencies from package.json:
Node/NPM:
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:
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:
|
Any movement on this? This continues to plague our projects and the manual work arounds that I've described are somewhat cumbersome and not really manageable... |
I have an Angular 5, TypeScript 2.4 project that can't get around this. Tried overriding types etc and it would break Angular module imports. So I just went with this library - https://github.com/prisma/graphql-request |
Ok I can't promise this will fix it for you but I was able to get this working. I am running the following versions of things (yes I know this thread is not about ionic/cordova but that is what I'm using so I'm listing those versions if it helps someone else): NPM
System:
I had to "hoist" a number of apollo dependencies up to my package.json in order to lock them at versions that would be compatible with apollo-utilities@1.0.12 here is what my final package.json looks like (only apollo-related):
I also had another issue with typescript that required I lock typeorm at a lower version:
Not sure if that will help anyone but after spending almost 2 days on this mess I thought I'd add it. I am not saying this WILL work for you and I know some of those versions could probably be bumped a little higher but I got them from another ionic/angular project that I work on that had not been updated (npm install from scratch or npm update) in some time. Lastly I could have fixed this without looking at a working project but tracking down everything that required the problem library (apollo-utilities) and looking at their github/versions to find out at which point they started using a >1.0.12 apollo-utilities and use the last good version before then. Parting words: I really hate npm's |
As a temporary solution, you can install older version. |
This no longer sounds like an Apollo Client issue, but if anyone thinks it is and can provide a small runnable reproduction using |
Intended outcome:
Here are version of packages that I'm using:
Actual outcome:
Running ng build produces
node_modules/apollo-utilities/lib/util/mergeDeep.d.ts(1,214): error TS1005: ',' expected.
The text was updated successfully, but these errors were encountered: