'yaml' dependency is not installed with slic-watch
varqasim opened this issue · comments
Describe the bug
Installing slic-watch on a project for the first time errors out when running sls package
or sls deploy
.
To Reproduce
Steps to reproduce the behavior:
- Install slic-watch as dependency
- Run
sls package
- Error is thrown
Expected behavior
yaml
comes as a dependency with slic-watch
Environment:
- OS: macOS
- Node.js Version: 14.4.0
- NPM version: 6.14.12
- Serverless Framework Version: 2.55.0
Additional context
First time installing slic-watch
Error ---------------------------------------------------
Error: Cannot find module 'yaml'
Require stack:
- /Users/qasimalbaqali/Project/cron-service/node_modules/serverless-slic-watch-plugin/default-config.js
- /Users/qasimalbaqali/Project/cron-service/node_modules/serverless-slic-watch-plugin/function-config.js
- /Users/qasimalbaqali/Project/cron-service/node_modules/serverless-slic-watch-plugin/alarms.js
- /Users/qasimalbaqali/Project/cron-service/node_modules/serverless-slic-watch-plugin/index.js
- /Users/qasimalbaqali/Project/cron-service/node_modules/serverless/lib/classes/PluginManager.js
- /Users/qasimalbaqali/Project/cron-service/node_modules/serverless/lib/Serverless.js
- /snapshot/serverless/lib/Serverless.js
- /snapshot/serverless/scripts/serverless.js
- /snapshot/serverless/bin/serverless.js
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1027:15)
at Function._resolveFilename (pkg/prelude/bootstrap.js:1459:46)
at Function.Module._load (internal/modules/cjs/loader.js:896:27)
at Module.require (internal/modules/cjs/loader.js:1087:19)
at Module.require (pkg/prelude/bootstrap.js:1338:31)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (/Users/qasimalbaqali/Project/cron-service/node_modules/serverless-slic-watch-plugin/default-config.js:5:14)
at Module._compile (internal/modules/cjs/loader.js:1198:30)
at Module._compile (pkg/prelude/bootstrap.js:1394:32)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1218:10)
at Module.load (internal/modules/cjs/loader.js:1047:32)
at Function.Module._load (internal/modules/cjs/loader.js:935:14)
at Module.require (internal/modules/cjs/loader.js:1087:19)
at Module.require (pkg/prelude/bootstrap.js:1338:31)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (/Users/qasimalbaqali/Project/cron-service/node_modules/serverless-slic-watch-plugin/function-config.js:7:23)
at Module._compile (internal/modules/cjs/loader.js:1198:30)
at Module._compile (pkg/prelude/bootstrap.js:1394:32)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1218:10)
at Module.load (internal/modules/cjs/loader.js:1047:32)
at Function.Module._load (internal/modules/cjs/loader.js:935:14)
at Module.require (internal/modules/cjs/loader.js:1087:19)
at Module.require (pkg/prelude/bootstrap.js:1338:31)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (/Users/qasimalbaqali/Project/cron-service/node_modules/serverless-slic-watch-plugin/alarms.js:4:30)
at Module._compile (internal/modules/cjs/loader.js:1198:30)
at Module._compile (pkg/prelude/bootstrap.js:1394:32)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1218:10)
at Module.load (internal/modules/cjs/loader.js:1047:32)
at Function.Module._load (internal/modules/cjs/loader.js:935:14)
at Module.require (internal/modules/cjs/loader.js:1087:19)
at Module.require (pkg/prelude/bootstrap.js:1338:31)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (/Users/qasimalbaqali/Project/cron-service/node_modules/serverless-slic-watch-plugin/index.js:6:16)
at Module._compile (internal/modules/cjs/loader.js:1198:30)
at Module._compile (pkg/prelude/bootstrap.js:1394:32)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1218:10)
at Module.load (internal/modules/cjs/loader.js:1047:32)
at Function.Module._load (internal/modules/cjs/loader.js:935:14)
at Module.require (internal/modules/cjs/loader.js:1087:19)
at Module.require (pkg/prelude/bootstrap.js:1338:31)
at require (internal/modules/cjs/helpers.js:73:18)
at requireServicePlugin (/Users/qasimalbaqali/Project/cron-service/node_modules/serverless/lib/classes/PluginManager.js:32:12)
at /Users/qasimalbaqali/Project/cron-service/node_modules/serverless/lib/classes/PluginManager.js:176:22
at Array.map (<anonymous>)
at PluginManager.resolveServicePlugins (/Users/qasimalbaqali/Project/cron-service/node_modules/serverless/lib/classes/PluginManager.js:173:10)
at PluginManager.loadAllPlugins (/Users/qasimalbaqali/Project/cron-service/node_modules/serverless/lib/classes/PluginManager.js:156:10)
at Serverless.init (/Users/qasimalbaqali/Project/cron-service/node_modules/serverless/lib/Serverless.js:209:30)
at async Serverless.eventuallyFallbackToLocal (/snapshot/serverless/lib/Serverless.js:264:5)
at async Serverless.init (/snapshot/serverless/lib/Serverless.js:193:5)
at async /snapshot/serverless/scripts/serverless.js:438:7
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 14.4.0
Framework Version: 2.41.2 (standalone)
Plugin Version: 5.0.0
SDK Version: 4.2.2
Components Version: 3.9.2
@qasimalbaqali Thank you for reporting this issue! This has been resolved in serverless-slic-watch-plugin@1.0.1