Build: Dependency detection and installation happens even when there is no build command

Created on 28 May 2020  路  5Comments  路  Source: netlify/build

Describe the bug

With the switchover to the new build plugin architecture, some deployments that worked previously are now failing.

With the old system, it appears that a project with no build command would skip dependency installation. This is no longer the case. See the discussion here:

https://community.netlify.com/t/build-commands-no-longer-being-skipped/15661

Deploy logs

bug

Most helpful comment

thanks for this report! Our team is looking into it. Wanted to link to our conversation (which you won't be able to see, but the engineers working on the fix will), since it might get lost in the slackstorm otherwise: https://netlify.slack.com/archives/CDV7MQR3Q/p1590688227414500

All 5 comments

thanks for this report! Our team is looking into it. Wanted to link to our conversation (which you won't be able to see, but the engineers working on the fix will), since it might get lost in the slackstorm otherwise: https://netlify.slack.com/archives/CDV7MQR3Q/p1590688227414500

Some technical details on this problem.

Before the release, the following early exit happened when no build command was set.

Now the following is performed, which was previously not for those users:

  • Run /usr/local/bin/build, our main buildbot Bash script
  • Install dependencies and runtimes depending on the project type: npm install for Node projects, rvm for Ruby, etc.
  • Run Netlify Build, which essentially runs Build plugins and build.command
  • Bundle Netlify Functions, providing a Functions directory was set
  • Upload/download build cache

A potential solution to this problem would be to revert to the previous behavior when it comes to the early exit when no build command was set.

With this addition: it also requires that no Build plugin is installed. This allows users without a build command to use Build plugins.

This solution would preserve perfect backward compatibility and fix the bugs mentioned by @fool, @williamjacksn and mentioned in https://community.netlify.com/t/build-commands-no-longer-being-skipped/15661

A solution is being outlined in https://github.com/netlify/buildbot/issues/784

This is now fixed in production. Please let us know if it works!

Was this page helpful?
0 / 5 - 0 ratings