-
Notifications
You must be signed in to change notification settings - Fork 417
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
support symlinked packages #580
Comments
Any workaround or help is appreciated too. |
Anyone here that found a workaround for that issue ? |
What commands did you use to the symlink? |
Hey, What I want to achieve:
=> library is symlinked in the template br, Flo |
@miguel-a-calles-mba does this answer your question ? |
@miguel-a-calles-mba Hey guys, please at least send a short reply. br, Flo |
Sorry for the delay. I was busy meeting a deadline at work and other things. It seems this might be an issue with the webpack package and not serverless-webpack. webpack/webpack#1643 Check out some of the suggested solutions and see whether they help. |
Thanks a lot for this list. I will check it. I would have expected that the error happens because sls webpack installs all the npm packages again in the .webpack folder and this is why it doesn`t recognize the symlink in the node_modules. |
You might want to consider this workaround. |
@pharindoko I'm having a similar issue (using Lerna; getting a "Not found" error for symlinked packages when I try to build). Did you find a solution? |
Hi @ardalann, My issue is described with this line: serverless-webpack/lib/packExternalModules.js Line 326 in 8859f1b
It reinstalls the package.json modules completely new in a not symlinked folder e.g. .webpack and won`t use the symlinked version in the current node_modules folder. when I run it with sls offline it does indeed work because there it uses the node_modules folder. |
I've just ran into this issue today. Here's the debug output when it tries and fails to deploy;
One way you can get around this issue (which isn't ideal) is (if you are using the |
@mogusbi-motech @pharindoko I managed to work around the issue by switching to the I did not need to add my symlinked module to webpack:
packagerOptions:
scripts:
- (cd node_modules/package-name && npm prune --production) |
Yeah. The documentation talks about changing to file: ../package-name but then it`s not symlinked. using @mogusbi-motech`s approach is what I would have tried now as well. |
Hi, I am having a similar issue with yarn. trying to include a local symlinked package called "@my-project/logging"
any thoughts welcome |
I give up on this issue. |
Hello,
it seems like I`m unable to use symlinked packages via lerna.
When I start it with sls offline it works.
When I try to deploy it always takes the npm - version of my (monorepo) package instead of the local version
This is a Feature Proposal
Description
For feature proposals:
detect if a package is symlinked and copy/attach this to the node_modules folder for webpack.
If there is additional config how would it look
webpack:
includeModules:
forceSymlink:
- [packagename]
Similar or dependent issue(s):
Additional Data
The text was updated successfully, but these errors were encountered: