Closed vlad-traceme closed 5 years ago
@vlad-traceme Thanks for the issue! 😄 The issue is probably a path issue. This code, which I wrote, is so weird. https://github.com/suguru03/serverless-plugin-warmup-ts-bridge/blob/67cc64d8bf5f2ebff80a63e3942d997a09687bbe/index.ts#L32-L34
It should be something like this.
const target = path.resolve(cwd, path.join(opts.buildFolder, opts.warmupDir));
if (!fs.existsSync(target)) {
fs.symlinkSync(path.resolve(cwd, opts.warmupDir), target);
I will test it this weekend!
@vlad-traceme I fixed the path, can you try it using the v0.1.1? I hope it works...!🤞
@suguru03 it doesnt seem to work, can we try using servicePath the warmup plugin originally does this:
const folderName = (typeof config.folderName === 'string') ? config.folderName : '_warmup';
const pathFolder = path.join(this.serverless.config.servicePath, folderName);
@vlad-traceme I changed the paths and release it on v0.1.2 🤔 Could you try it again? 🙏
@suguru03 I can't even seem to deploy a stage locally ;( ENOENT: no such file or directory, open '/Users/...../.build/_warmup'
Contents of build directory: drwxr-xr-x 8 vladiacob staff 256 May 7 09:43 ./ drwxr-xr-x 23 vladiacob staff 736 May 7 09:43 ../ drwxr-xr-x 3 vladiacob staff 96 May 7 09:43 .serverless/ lrwxr-xr-x 1 vladiacob staff 59 May 7 09:43 _warmup@ -> /Users/vladiacob/Documents/Tally/partner-web-sports/_warmup drwxr-xr-x 6 vladiacob staff 192 May 7 09:43 conf/ lrwxr-xr-x 1 vladiacob staff 64 May 7 09:43 node_modules@ -> /Users/vladiacob/Documents/Tally/partner-web-sports/node_modules lrwxr-xr-x 1 vladiacob staff 64 May 7 09:43 package.json@ -> /Users/vladiacob/Documents/Tally/partner-web-sports/package.json drwxr-xr-x 5 vladiacob staff 160 May 7 09:43 src/
it seems the _warmup dir is not even building in the project root dir. the symlink is created point to that spot
@vlad-traceme hmm 🤔
it seems the _warmup dir is not even building in the project root dir.
It is weird, I haven't modified the _warmup
dir path. Do you know where it is created?
Also, how do you run the sls
command? I put the command as a npm-run-script into package.json and run it via npm run command.
My directory structure is
root
|- packages
|- serverless
|- .build
|- .serverless
|- _warmup
|- serverless.yml
|- package.json
|- tsconfig.json
@vlad-traceme Do you have any update? 👀
@suguru03 not as of yet. I actually went ahead and updated to using Webpack for serverless and moving away from the serverless typescript plugin since it is not constantly updated.
@vlad-traceme Sure 👍 CircleCI seems fine. So I will close this issue for now.
i am able to serverless deploy locally fine, but when I use gitlab ci pipelines, which in turn builds on a specified host and does a serverless deploy it fails with: