question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to custom the servicePath prop when running built-in commands

See original GitHub issue

This is a Feature Proposal

I wanted to custom the service path when running built-in serverless commands such as deploy, package. Right now, it always set to .serverless

Description

  • I had a mono-repo that contains some micro-services written in TypeScript, each micro-service has it own serverless.yml file
  • Then when running any serverless command, I will have to provide --config option i.e. sls package --config /users/serverless.yml. Since we use serverless-webpack plugin to bundle the TS files so if we run the serverless command inside each service directory, we will get an error
  • I wanted to build multiple services parallel to speed up my deployment time, however, if I run same serverless command i.e. package some files created by package command will be overridden because it writes to the same directory which is .serverless.
  • The package command currently writes the files to the .serverless directory then move to target package directory (use --package package-dir option)

So my question is how can change the default service path .serverless (the value of serverless.config.servicePath property)?

image

Similar or dependent issues:

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hoang-innomizetechcommented, Sep 24, 2019

Here is an error sometimes occurs when running package command parallel for multiple services

Serverless: Bundling with Webpack...
Serverless: Bundling with Webpack...
   28 modules
   34 modules
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: ....
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: .....
Serverless: Packaging service...
Serverless: Packaging service...
 
  Error --------------------------------------------------
 
  Error: ENOENT: no such file or directory, open '.serverless/users-service.zip'
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
0reactions
chaoyangnzcommented, Jul 7, 2021

so muh painful for parallel deployment and monorepo, please please save us!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change path to executable for a Windows Service?
You can use the sc config command to change the path a service points to: SC CONFIG YourServiceName binPath= "C:\SomeDirectory\YourFile.EXE".
Read more >
Setting properties and options on startup | Administering Jira ...
Setting Properties for Windows Services via Command Line. Identify the name of the service that Jira is installed as in Windows ( Control...
Read more >
Install a Windows service using a Windows command prompt?
Navigate to the installutil.exe in your .net folder (for .net 4 it's C:\Windows\Microsoft.NET\Framework\v4.0.30319 for example) and use it to install your ...
Read more >
Cisco SD-WAN Command Reference - Operational ...
Clear the cflowd flows in a specific VPN (on vEdge routers only). clear app cflowd flows vpn vpn-id [ flow-property ]. Syntax Description ......
Read more >
Schematics for libraries - Angular
The Angular CLI uses this entry to find named schematics in your collection when it runs commands. projects/my-lib/package.json (Schematics Collection ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found