Open karol-szymanowski opened 3 years ago
My memory of this code is that amplify will look for a yarn.lock file in your directory. If found, yarn is used, else npm
In this case, it makes it incompatible with yarn workspaces, because when used, the file yarn.lock
is generated only in project's root directory. I think the "install dependencies" step should be optional and there should be a flag to toggle it because it might cause conflicts when using different building tools/flows.
Does this behavior also apply to the frontend or is it just only for functions?
Its not clean but I've been doing something like this for some time now:
and then in each function I have a nohoist
setup:
its not perfect but its a attempt to get it working.
Having the same issue with Yarn workspaces. When using amplify push
, Amplify is installing function dependencies and also purges all other dependnecies of monorepo, which of course breaks everything,
In my project, we use yarn and yarn workspaces to manage all dependencies, and I noticed that every time functions are deployed or mocked, the package-lock.json file is generated. Is there a way to set yarn as the default tool or ideally disable installing dependencies step?