-
Notifications
You must be signed in to change notification settings - Fork 230
.build/node_modules symlink vs. npm #45
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
Comments
Could you elaborate a bit more on the implications of replacing |
So my current playground setup looks like this ... excerpt from {
...
"devDependencies": {
"@types/aws-lambda": "0.0.18",
"@types/node": "^8.0.47",
"aws-sdk": "^2.141.0",
"serverless": "^1.23.0",
"serverless-plugin-typescript": "^1.1.3"
},
"dependencies": {}
} (so only dev dependencies, serverless installed locally) With the replacement mentioned above in place, Within
yet without the change/fix in place both
Notice how it reports unmet dependencies with the actual dependencies + extraneous directories in node_modules folder. This seems to be due to some special handling in npm for symlinks... Regarding the downsides of this change I think it's just about copying around lots of data instead of creating a two symlinks. Even in my simple case it's copying around 100 MBs on each build, be it In a way this would also "solve" issue #23 :-) |
@pmuens could you share your view on this? |
Thanks for pinging @schickling 👍 Sounds like a feasible solution! Wondering if this is an edge case or smth. common 🤔. |
Maybe a good solution is to use copy when deploying and linking while building for development? |
Also having issues with this. |
I'm experiencing the exact same issue described by @stesie. I came across a workaround in a different issue that fixes this for me (#89 (comment)) – set I'd still love to see this get fixed though! |
I have the same issue: the " This is not a Windows issue; This largely breaks I'm not sure what the best fix is from
|
I think the title of this issue should be changed to be more like " |
Hey,
I've just recently started trying out serverless framework and this plugin just today. So sorry in case things are a bit inaccurate :)
My problem is that, together with the typescript-plugin, the core's package plugin fails to properly exclude development dependencies from the build/package. This way even a simple "hello world" function has a footprint of roughly 15MB, where it should be just about 2 kB.
Problem seems to be, that package plugin just calls
npm ls --dev=true ...
andnpm ls --prod=true ...
and diffs the output of those two. With this plugin these shell calls are done from the.build
folder, yetnpm ls --dev=true ...
fails to properly list all the dependencies as it stumbles over the symlinking.Seems like it doesn't expect deduped/flattened dir structure then.
Replacing both
symlinkSync
calls bycopySync
immediately fixes the problem so :)... yet I'm unsure if there's a better way to do that ...
regards
The text was updated successfully, but these errors were encountered: