-
Notifications
You must be signed in to change notification settings - Fork 416
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
Doesn't work with Yarn & private NPM packages on CircleCI #71
Comments
I ran into this same problem and I think it's because npm-programmatic isn't picking up the |
Thanks @mhodgson, I'll give that a try. But still seems weird that something like I really want to take advantage of |
Related: circleci/circleci-docs#593 |
@adambiggs Agreed. I'm wondering why we need to run npm to install the packages at all. It seems we should just be able to copy them directly from the node_modules folder. Wouldn't that ensure deps are kept consistent? Are there risks to doing this? Maybe we should put together a PR testing this strategy. |
@mhodgson I'm guessing the thinking behind using Maybe this makes sense as default behaviour... I guess that's debatable. Either way:
|
Agree with @adambiggs, also during debug I sometimes put some console statements in a dependency, but at the moment there is no way for my debug code to run on production. Well, there are ways...but it was unexpected that my changes to a dependency in the node_modules folder didn't make it to Lambda. |
I will close this very old task for now. Thanks for the discussion. The latest versions of the plugin (V3 and V4) have some improvements in the packaging (and V4 now even offers events that can be hooked by a further plugin). So we should start a completely new discussion if needed, and check, if and how the new implementation can support deploying a copy of the local node modules (maybe only for Feel free to continue the discussion. |
Just seen this running latest versions of serverless, of this plugin too on CircleCI. |
We're using Artifactory and experience the same problem on GitLab. Moving the npmrc prior to deploy works, as does setting the packager to yarn in custom:
webpack:
packager: 'yarn' This is preferable as it contains operations within the build directory. If the defect is in an external project, do we have a linked issue? If it is limited to serverless-webpack, should we consider reopening this one? |
I've been using Yarn with serverless-webpack to deploy my functions for a while now without any issues (on OSX)... But I can't seem to get continuous deployment working on CircleCI with the same configuration.
I get the following error on CircleCI:
I have no idea why, but it seems like serverless-webpack depends on NPM's cache for some reason...
$ yarn install
$ sls deploy
Error! 😢
$ npm install
$ sls deploy
Success! 😕
$ npm install
$ rm -rf node_modules
$ yarn install
$ sls deploy
Success!? 🤔
$ npm install
$ rm -rf node_modules
$ npm cache clean
$ yarn install
$ sls deploy
Error!? 😵
Does this have something to do with the
npm-programmatic
module? Why does serverless-webpack need to install packages itself instead of just using what's already installed innode_modules
?The text was updated successfully, but these errors were encountered: