Open traviscollins opened 2 years ago
Same problem with apollo client > 3.4.x but with 3.3.21 it works
pkg/prelude/bootstrap.js:1833
throw error;
^
Error: Cannot find module 'ts-invariant/process'
Require stack:
- /snapshot/project/tool/node_modules/@apollo/client/utilities/globals/globals.cjs.js
- /snapshot/project/tool/node_modules/@apollo/client/core/core.cjs.js
- /snapshot/project/tool/node_modules/apollo-upload-client/public/createUploadLink.js
- /snapshot/project/tool/node_modules/apollo-upload-client/public/index.js
- /snapshot/project/tool/build/apollo.js
- /snapshot/project/tool/build/export-order.js
- /snapshot/project/tool/build/boot.js
- /snapshot/project/tool/build/index.js
Hello! Please try upgrading to the most current version 3.6.8
, You can review our changelog for details on what was released recently. If you still have any issue just let us know. Thank you!
I still have issues with server-side rendering. I'm using the latest version 3.7.1
/Users/fullstack-pro/servers/frontend-server/dist/main.js:1
Error: Cannot find module './core/index.js'
Require stack:
- /Users/fullstack-pro/servers/frontend-server/dist/main.js
- /Users/fullstack-pro/servers/frontend-server/dist/index.js
at Object.6082 (/Users/fullstack-pro/servers/frontend-server/dist/webpack:/sample-stack-frontend-server/src/index.ts:1)
at __webpack_require__ (/Users/fullstack-pro/servers/frontend-server/dist/webpack:/sample-stack-frontend-server/webpack/bootstrap:19:1)
at Object.1005 (/Users/fullstack-pro/servers/frontend-server/dist/webpack:/sample-stack-frontend-server/src/backend/website.tsx:3:1)
at __webpack_require__ (/Users/fullstack-pro/servers/frontend-server/dist/webpack:/sample-stack-frontend-server/webpack/bootstrap:19:1)
error Command failed with exit code 1.
The issue is in my end. Not issue for me now.
Any update on this? I confirm that all is fine on 3.3.21. 3.6.8 is broken.
I confirm that using pkg@5.8.0 all is fine using @apollo/client@3.3.21 and breaks using @apollo/client@3.7.3.
Cheking the file difference between 3.3.21 and 3.4.0 I don't see any mentioning of the ts-invariant/process except in one place. src/utilities/globals/graphql.ts
I also see that there is a normalization process happening for ts-invariant/process, not sure if it would affect pkg: https://github.com/apollographql/apollo-client/blob/792ac32f5b5d23b3346fa07a4d8ac35f0e7e8d70/config/postprocessDist.ts#L100-L122
Intended outcome: Use the pkg to build native executables. My project depended on @apollo/client@3.2.5 for many months, with no issues.
Actual outcome: I upgraded to 3.5.10 and now the pkg output executable throws an related to apollo/client's use of ts-invariant/process.
How to reproduce the issue:
https://github.com/traviscollins/react-apollo-error-template
Versions
Affects 3.4.0 and higher.