Skip to content
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

Error while upgrading from 7.3.0 to 8.0.0 #4517

Closed
ihardyslide opened this issue Feb 1, 2024 · 8 comments
Closed

Error while upgrading from 7.3.0 to 8.0.0 #4517

ihardyslide opened this issue Feb 1, 2024 · 8 comments
Labels

Comments

@ihardyslide
Copy link

ihardyslide commented Feb 1, 2024

Hi,

I am currently upgrading my Coral instance from 7.3.0 to 8.0.0
My approach was to do it step by step (each version), because we have some customizations where merge conflicts could happen.
This worked quite well, but now I am stuck.
I went from 7.5.0 to 8.0.0 and suddenly my npm i --legacy-peer-deps won't finish anymore.

Following error is logged in the console:

npm WARN tarball tarball data for react-relay@git+ssh://git@github.com/coralproject/patched.git#507b0047b53f47e258528853054c263e77a5b392 (sha512-zgafqWphSGFPSJ/h23zPpFGZ4tzKyj8eQPLTeZEwdbtmqAFsAIjPS0zSCo2DcsaeylEgSrQDShttpKYyEUtRAg==) seems to be corrupted. Trying again.

npm ERR! code EINTEGRITY

npm ERR! sha512-zgafqWphSGFPSJ/h23zPpFGZ4tzKyj8eQPLTeZEwdbtmqAFsAIjPS0zSCo2DcsaeylEgSrQDShttpKYyEUtRAg== integrity checksum failed when using sha512: wanted sha512-zgafqWphSGFPSJ/h23zPpFGZ4tzKyj8eQPLTeZEwdbtmqAFsAIjPS0zSCo2DcsaeylEgSrQDShttpKYyEUtRAg== but got sha512-sbFNlti6u8t+JWSdhuHLbysG6cU0Ml34yZAcnRyYBdtueehUwP22bC25mUovkxl/88Fs5iQwJmAqPNiPWneQ4w==. (125350 bytes)

Expected behavior:
npm install finishes without errors

Actual behavior:
npm install finishes with errors

Related Issues: /

Versions:

  • NodeJS: 14.18.3
  • NPM: 8.0.0
  • MongoDB: 4.2
  • Redis: 3.2
  • Browser: /
  • OS: Debian 11
@ihardyslide ihardyslide added the bug label Feb 1, 2024
@ihardyslide
Copy link
Author

Nevermind, I solved it somehow by multiple times cleaining npm cache and deleting package-lock.json and node_modules and installing again.

@ihardyslide
Copy link
Author

Sorry for reopening, but now I experience a different error.
Suddenly, the typecheck which runs with the build is also type checking d.ts files inside node_modules folder.
This breaks the build because of ~500 errors.

example:
node_modules/graphql-redis-subscriptions/node_modules/ioredis/built/utils/RedisCommander.d.ts(3574,122): error TS1005: ',' expected.

Do you have any idea what is causing this? I am on coral version 8.0.4 now.

@ihardyslide ihardyslide reopened this Feb 1, 2024
@losowsky
Copy link
Member

losowsky commented Feb 1, 2024

Got it - can you confirm you've been following the steps in our migration docs? https://docs.coralproject.net/migrating-7-to-8

@ihardyslide
Copy link
Author

Hi,

I've read the migration docs, but the only thing which is actually to do according to this, is to adapt the available ressources for redis and mongo.
Since I can not even get the build to work, I can not start Coral and therefore the connections to the databases are not even established yet.
So I do not know what could interfere here with the build.
Did I miss something?

Thanks for quick response.
BR

@ihardyslide
Copy link
Author

ihardyslide commented Feb 2, 2024

I meanwhile tried to add --showConfig to the tscheck npm scripts, like so:

"tscheck:client": "tsc --showConfig --project ./src/core/client/tsconfig.json --noEmit",
"tscheck:scripts": "tsc --showConfig --project ./tsconfig.json --noEmit",
"tscheck:server": "tsc --showConfig --project ./src/tsconfig.json --noEmit",

This showed me, that the config is actually correct (skipLibCheck:true and exclude: ["node_modules"]), and also at the mentioned files, there is nothing to be seen from node_modules.

Output from above:
https://pastebin.com/dqRfAPWp

But as soon as I run the tscheck normally without this parameter, following errors are produced:
https://pastebin.com/9r1sHvTA

And these are the files I get output when I add the --listFiles parameter (--explainFiles ist not available yet in this typescript version):
https://pastebin.com/mgCFFk2V

@kabeaty
Copy link
Contributor

kabeaty commented Feb 5, 2024

Hello, I’ve looked into your links and errors that you’re seeing, and it’s a tough one to troubleshoot from afar. It definitely seems like something has somehow gotten incorrectly installed. It sounds like you’ve already removed node_modules and done a clean install of your npm cache with npm ci, which is what I would do and recommend in this case. I would probably also double-check my node and npm versions. Do you have any more updates or info to share that might help figure it out?

@ihardyslide
Copy link
Author

Hi, I was able to get rid of the errors by rolling back to a commit where I did not yet delete package-lock.json and node_modules.
Then I manually editet the package-lock.json and replaced the sha512 hash to get rid of the EINTEGRITY error I mentioned initially in this issue.
After this, I could install normally and continue with the upgrade.

Meanwhile I was able to upgrade to the latest version.

Unfortunately I have no idea why this errors happened.

Anyway I guess this can be closed, thanks.

@kabeaty
Copy link
Contributor

kabeaty commented Feb 8, 2024

Happy to hear that you got this figured out! I'll close this issue then.

@kabeaty kabeaty closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants