-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nx-serve only works with dev environments #77
Comments
The repo uses yarn now, not npm. So it's got a yarn.lock and you install deps using That type of error often clears up after removing node_modules and installing again. I've never tested mimicEnv across accounts so I'm not sure if there's any gotchas there. But essentially all it's doing is finding a stack and grabbing the environment variables from lambdas in that stack, and importing them locally. That's not relevant to layers, because the layer arn is not an environment variable. The layer arn is derived from a stack output. The relevant parts of the example config:
|
Yes... silly me. I just use NPM in my projects, didn't even think about it. You list it in the readme and everything. Sorry.
The layer arn is important for the layers as when you load SAM locally it pulls the remote layer from the AWS server. As the whole stack gets the -dev / -prod suffix, and I don't have a dev env (just prod) it cannot pull anything. I have a PR for this. I wrote some specs ... I will try to help out with some more in the future. |
@vespertilian thanks so much for the pr, I've been slammed recently and haven't had a chance to look. Do you have some time this week to review together? |
Yeah, I think I can do even better but let's talk about it Wednesday or Thursday some time? |
Hey,
So I have an account-based AWS setup (separate accounts for each env). I changed the stack suffix from dev to prod as they are all effectively prod.
However, I can not serve locally when using layers as we seem to use a
mimic env
var which does not set the layer suffix, layers are also deployed as my-layer-name-[dev/prod].I was looking at trying to add this however I cannot seem to even build the master branch. There was no
package.lock
file checked in so maybe an update has broken the build?suffixes.
Can you build the project after an npm install?
Also, I am thinking maybe mimicEnv useDeployedSuffix ? Or does it mimic other aspects of the build?
The text was updated successfully, but these errors were encountered: