Describe the bug
I created a default instance and when I try to upload assets it does not work, it gives the following error:
run:server] error 7/1/20, 8:55 PM - [ExceptionsHandler] Maximum call stack size exceeded
[run:server] RangeError: Maximum call stack size exceeded
[run:server] at _openReadFs (internal/fs/streams.js:150:21)
[run:server] at ReadStream.<anonymous> (internal/fs/streams.js:146:3)
[run:server] at ReadStream.deprecated [as open] (internal/util.js:89:15)
[run:server] at ReadStream.open (/Users/fmq/workspace/work/my-app/node_modules/fs-capacitor/lib/index.js:90:11)
[run:server] at _openReadFs (internal/fs/streams.js:153:12)
[run:server] at ReadStream.<anonymous> (internal/fs/streams.js:146:3)
[run:server] at ReadStream.deprecated [as open] (internal/util.js:89:15)
[run:server] at ReadStream.open (/Users/fmq/workspace/work/my-app/node_modules/fs-capacitor/lib/index.js:90:11)
[run:server] at _openReadFs (internal/fs/streams.js:153:12)
[run:server] at ReadStream.<anonymous> (internal/fs/streams.js:146:3)
To Reproduce
Steps to reproduce the behavior:
yarn create @vendure my-app
cd my-app
yarn start
http://localhost:3000/admin/catalog/assets
If debug is enabled the following is printed:

Expected behavior
The asset is uploaded to the asset library.
Environment (please complete the following information):
Additional context
after testing I added debug by adding logger config to config file (src/vendure-config.ts)
logger: new DefaultLogger({ level: LogLevel.Debug }),
I think this is due to the graphql-upload version used by apollo-server-express. See this issue: https://github.com/apollographql/apollo-server/pull/4039
The gist of it is that the current version of apollo server (which Vendure uses) uses an outdated version of the graphql-upload library, which is incompatible with node v13+. This PR looks to be approved so as soon as it makes it into a version of Apollo server then we can update our dependency.
Excelent, so my other path if I did not want to wait (or they take too long ) would be to revert node to 12.x ..
Thanks, I'll try this, do you want to leave this open so we validate once the PR is applied or would you prefer to put it on hold?
I just downgraded to node v12.18.2 and it's working now.
I will retest once de PR is in place and re-open this issue if it still fails.
Thanks
I think this is due to the graphql-upload version used by apollo-server-express. See this issue: apollographql/apollo-server#4039
The gist of it is that the current version of apollo server (which Vendure uses) uses an outdated version of the graphql-upload library, which is incompatible with node v13+. This PR looks to be approved so as soon as it makes it into a version of Apollo server then we can update our dependency.
I guess they are altogether removing inbuilt graphql-upload support
https://github.com/apollographql/apollo-server/issues/3508#issuecomment-662371289
Although some person is claiming a library upgrade is fixing their issue
https://github.com/apollographql/apollo-server/pull/4039#issuecomment-742273807
Re-opening this because it looks like Apollo will not fix this until Server v3, and we don't want people to keep running into this when we launch Vendure v1.0.
Looks like the Apollo team have decided to get this solved in v2: https://github.com/apollographql/apollo-server/issues/4865
Hopefully then we'll just need to upgrade to the latest Apollo Server v2.x to resolve this.
The fix is now available in apollo-server-core v2.21.0, but unfortunately we can't directly ugrade to that right now because we it is a transitive dependency via @nestjs/graph, which is still using v2.16.1. Therefore the fix for now will probably be to implement something like https://github.com/nestjs/graphql/issues/901#issuecomment-780007582
Most helpful comment
I just downgraded to node v12.18.2 and it's working now.
I will retest once de PR is in place and re-open this issue if it still fails.
Thanks