Open cryptiklemur opened 5 years ago
I suspect that the root cause is #78
I resolved this issue with using suguru03/serverless-plugin-warmup-ts-bridge.
// serverless.yaml
plugins:
- serverless-plugin-warmup-ts-bridge
- serverless-plugin-warmup
- serverless-plugin-typescript
serverless-plugin-warmup-ts-bridge is great but there are some issues for the latest serverless-plugin-typescript versions. I have created an npm package that solves it: https://www.npmjs.com/package/serverless-plugin-warmup-ts-bridge-v2
If the latest serverless-plugin-typescript
supports no-TS handlers as it should then you don't need serverless-plugin-warmup-ts-bridge
neither serverless-plugin-warmup-ts-bridge-v2
. 🙂
Hello @juanjoDiaz !
So the issue wasn't related to TS Handle support, your plugin is great and it works correctly but when used with serverless-plugin-typescript
there are some issues with the artifacts path imports, that's what serverless-plugin-warmup-ts-bridge
solves.
This is an example of the error:
Error: Could not add file content to hash: Error: ENOENT: no such file or directory, open '/Users/admin/Projects/afterpay-bold-plugin/.build/.serverless/warmUpPlugin.zip'
at ReadStream.<anonymous> (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/plugins/aws/package/compile/functions/index.js:681:16)
at ReadStream.emit (events.js:315:20)
at ReadStream.EventEmitter.emit (domain.js:483:12)
at /Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:282:14
at /Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:333:16
at FSReqCallback.oncomplete (fs.js:156:23)
From previous event:
at AwsCompileFunctions.compileFunction (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/plugins/aws/package/compile/functions/index.js:103:25)
at /Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/plugins/aws/package/compile/functions/index.js:623:62
From previous event:
at AwsCompileFunctions.compileFunctions (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/plugins/aws/package/compile/functions/index.js:623:22)
From previous event:
at Object.package:compileFunctions [as hook] (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/plugins/aws/package/compile/functions/index.js:32:12)
From previous event:
at PluginManager.invoke (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/classes/PluginManager.js:510:22)
at PluginManager.spawn (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/classes/PluginManager.js:530:17)
at /Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:122:50
From previous event:
at Object.before:deploy:deploy [as hook] (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/plugins/deploy/deploy.js:102:22)
at /Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/classes/PluginManager.js:510:55
From previous event:
at PluginManager.invoke (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/classes/PluginManager.js:510:22)
at /Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/classes/PluginManager.js:545:24
From previous event:
at PluginManager.run (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/classes/PluginManager.js:545:8)
at /Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/Serverless.js:168:33
From previous event:
at Serverless.run (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/lib/Serverless.js:155:74)
at /Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/scripts/serverless.js:50:26
at processImmediate (internal/timers.js:456:21)
From previous event:
at Object.<anonymous> (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/scripts/serverless.js:50:4)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/admin/.nvm/versions/node/v12.18.3/lib/node_modules/serverless/bin/serverless.js:47:1)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
But after some time, we had the following issues caused by an upgrade from serverless-plugin-typescript
:
And those are the issues I fixed in serverless-plugin-warmup-ts-bridge-v2
Please let me know if it makes sense, happy to collaborate and thank you so much again for your beloved plugin!!
serverless-plugin-warmup-ts-bridge-v2
I have the same error like this, I am using serverless-plugin-typescript and serverless-plugin-warmup
after run serverless deploy
, same error
@ZarcoNontol u install both serverless-plugin-warmup-ts-bridge
and serverless-plugin-warmup-ts-bridge-v2
?
For reference:
https://github.com/FidelLimited/serverless-plugin-warmup/issues/43 https://github.com/FidelLimited/serverless-plugin-warmup/issues/85
Seems like it might be an issue with this plugin? But i'm not sure. Posting for visibility, and possibly guidance.