You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently added a new lambda function with mainly serverless-http, apollo-server-express, graphql-modules and got this error when starting, preventing to run the server:
➜ yarn lambda-serve
yarn run v1.15.2
$ NODE_ENV=development netlify-lambda -c ./netlify.webpack.functions.js serve lambda-src
netlify-lambda: Starting server
Hash: e5ff9126f80c7609c6e2
Version: webpack 4.29.6
Time: 7100ms
Built at: 04/18/2019 6:49:38 AM
Asset Size Chunks Chunk Names
0.js 8.29 MiB 0 [emitted]
1.js 19.5 KiB 1 [emitted]
2.js 673 bytes 2 [emitted]
graphql.js 9.84 MiB graphql [emitted] graphql
Entrypoint graphql = graphql.js
[...]
path.js:39
throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.join (path.js:1157:7)
at Object.clearCache (/workspace/cfa/pronostics-lyonnais/node_modules/netlify-lambda/lib/serve.js:183:25)
I use netlify-lambda v1.4.5 but I've met this issue in the previous version too.
The error is thrown by clearCache, because 3 chunks have an undefined name, and come from this piece of code:
Those chunks are created in the lambda function with the id instead (0.js, 1.js, ...) and seem to be related to typescript (but I don't use typescript at all in my source code), and graphql-related libraries like graphql-import.
Also, just in case, here is my webpack custom config:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi,
I've recently added a new lambda function with mainly serverless-http, apollo-server-express, graphql-modules and got this error when starting, preventing to run the server:
I use netlify-lambda v1.4.5 but I've met this issue in the previous version too.
The error is thrown by clearCache, because 3 chunks have an undefined name, and come from this piece of code:
Those chunks are created in the lambda function with the id instead (0.js, 1.js, ...) and seem to be related to typescript (but I don't use typescript at all in my source code), and graphql-related libraries like graphql-import.
Also, just in case, here is my webpack custom config:
From my understanding we should fallback to chunk.id if chunk.name is undefined, when clearing the cache.
The text was updated successfully, but these errors were encountered: