⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.
What went wrong?
When running npx serverless deploy, The application failed to deploy with what seems to be a recursive path concatenation error. Could also be caused by webpack or terser-webpack-plugin, but the app builds successfully without serverless.
What did you expect should have happened?
Serverless would have correctly deployed the code.
http: 'ANY {proxy+}'
environment:
NODE_ENV: production
* What stacktrace or error message from your provider did you see?
Error --------------------------------------------------
ENAMETOOLONG: name too long, open '/Users/Jon/Code/Projects/nextjs-test/packages/client/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plug
in/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plu
gin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-pl
ugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-p
lugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-
plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/declarations/plugins/optimize/OccurrenceOrderChunkIdsPlugin.d.ts'
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Stack Trace --------------------------------------------
Error: ENAMETOOLONG: name too long, open '/Users/Jon/Code/Projects/nextjs-test/packages/client/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack
-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpac
k-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpa
ck-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webp
ack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/node_modules/.bin/terser-web
pack-plugin/node_modules/webpack/node_modules/.bin/terser-webpack-plugin/node_modules/webpack/declarations/plugins/optimize/OccurrenceOrderChunkIdsPlugin.d.ts'
at Package.getFileContent (/Users/Jon/.npm/_npx/2152/lib/node_modules/serverless/lib/plugins/package/lib/zipService.js:118:15)
at Package.getFileContentAndStat (/Users/Jon/.npm/_npx/2152/lib/node_modules/serverless/lib/plugins/package/lib/zipService.js:107:12)
at Array.map (<anonymous>)
at WriteStream.output.on (/Users/Jon/.npm/_npx/2152/lib/node_modules/serverless/lib/plugins/package/lib/zipService.js:84:33)
at WriteStream.emit (events.js:182:13)
at WriteStream.EventEmitter.emit (domain.js:442:20)
at /Users/Jon/.npm/_npx/2152/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:231:14
at /Users/Jon/.npm/_npx/2152/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:258:16
at FSReqWrap.oncomplete (fs.js:145:20)
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: darwin
Node Version: 10.7.0
Serverless Version: 1.36.1
This is a Bug Report
Description
What went wrong? When running
npx serverless deploy
, The application failed to deploy with what seems to be a recursive path concatenation error. Could also be caused by webpack orterser-webpack-plugin
, but the app builds successfully withoutserverless
.What did you expect should have happened? Serverless would have correctly deployed the code.
What was the config you used?
plugins:
provider: name: aws runtime: nodejs8.10 stage: prod region: eu-west-2 timeout: 10 profile: nextjs-test environment: NODE_ENV: production LAMBDA: true
functions: app: handler: lambda.handler events:
Similar or dependent issues: