serverless: Serverless Deploy Error: Path must be a string. Received undefined
This is a (Bug Report / Feature Proposal)
Description
Serverless deploy error: Path must be a string. Received undefined.
Additional Data
- OS: Mac OS X
- Serverless version: 1.23.0
- Webpack version: 1.14.0
- Serverless webpack version: ^1.0.0-rc.3
- Typescript version: ^2.2.0
Stack Tract
Serverless: Packaging service...
Serverless: Excluding development dependencies...
path.js:28
throw new TypeError('Path must be a string. Received ' + inspect(path));
^
TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at Object.basename (path.js:1383:5)
at functionNames.forEach.name (/Users/cmwhited/TransitPros/projects/cloud-api/node_modules/serverless-webpack/lib/cleanup.js:27:28)
at Array.forEach (<anonymous>)
at fse.copy (/Users/cmwhited/TransitPros/projects/cloud-api/node_modules/serverless-webpack/lib/cleanup.js:23:31)
at doneOne (/Users/cmwhited/TransitPros/projects/cloud-api/node_modules/serverless-webpack/node_modules/fs-extra/lib/copy/ncp.js:237:40)
at /Users/cmwhited/TransitPros/projects/cloud-api/node_modules/serverless-webpack/node_modules/fs-extra/lib/copy/ncp.js:122:11
at /Users/cmwhited/TransitPros/projects/cloud-api/node_modules/serverless-webpack/node_modules/graceful-fs/polyfills.js:239:18
at FSReqWrap.oncomplete (fs.js:135:15)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (5 by maintainers)
Thank you. For
serverless-webpack@^3.0.0andwebpack@^3.0.0you should change it as follows:This entries setting also allows you to use individual packaging together with the plugin, so that each function is optimized and compiled separately. Additionally, it now works with
serverless invoke local.Thanks @cmwhited for reporting 👍 Could you share the serverless.yml you are using so that we can try to reproduce it?