netlify / cli

Netlify Command Line Interface
http://cli.netlify.com
MIT License
1.59k stars 365 forks source link

[v17.36.2]: Running into "Multiple possible build commands found" with builds disabled #6841

Open gfellerph opened 2 months ago

gfellerph commented 2 months ago

Describe the bug

We're building our static page in a GitHub Action and deploy just the .zip. Therefore we disabled builds on netlify. Since the 20th of September 2024, our netlify deploy command fails with the error (https://github.com/swisspost/design-system/actions/runs/11066480112/job/30747794144):

Multiple possible build commands found
 ›   Error: Detected commands for: Hydrogen, Remix. Update your settings to specify which to use. Refer to https://ntl.fyi/dev-monorepo for more information.

However, our deploy command should disable builds:

netlify deploy --filter @swisspost/design-system-documentation --build false --dir ${{ steps.build.outputs.folder }} --alias $url_alias

Also, in the changelog there is a feature entry that does not seem to belong to any version (https://github.com/netlify/cli/blob/main/CHANGELOG.md#17362-2024-09-20).

image

Steps to reproduce

See build command and linked action runs above.

Configuration

https://github.com/swisspost/design-system/blob/main/packages/documentation/netlify.config.json

Environment

Not easy since we're installing the netlify cli only for action runs. I hope the information above is enough.

what1s1ove commented 1 month ago

I have the same problem, and I cannot downgrade the versions of the Netlify CLI.

Moreover, the link in this error does not help to fix the problem.

Multiple possible build commands found › Error: Detected commands for: Hydrogen, Remix. Update your settings to specify which to use. Refer to https://ntl.fyi/dev-monorepo for more information.

nekomeowww commented 1 month ago

Same issue here.

In our open source repository https://github.com/nolebase/integrations , we have a custom GitHub Actions manifest running with the following command:

netlify deploy --dir 'docs/.vitepress/dist' --prod --debug

which will produce:

Multiple possible build commands found
 ›   Warning: Error: Detected commands for: Hydrogen, Remix. Update your settings to specify which to use. Refer to https://ntl.fyi/dev-monorepo for more information.
 ›       at detectFrameworkSettings (file:///home/runner/setup-pnpm/node_modules/.bin/global/5/.pnpm/netlify-cli@17.36.4_@types+node@22.7.5/node_modules/netlify-cli/dist/utils/build-info.js:71:19)
 ›       at async deploy (file:///home/runner/setup-pnpm/node_modules/.bin/global/5/.pnpm/netlify-cli@17.36.4_@types+node@22.7.5/node_modules/netlify-cli/dist/commands/deploy/deploy.js:642:22)
 ›       at async BaseCommand.<anonymous> (file:///home/runner/setup-pnpm/node_modules/.bin/global/5/.pnpm/netlify-cli@17.36.4_@types+node@22.7.5/node_modules/netlify-cli/dist/commands/deploy/index.js:105:5)
 ›       at async BaseCommand.parseAsync (/home/runner/setup-pnpm/node_modules/.bin/global/5/.pnpm/commander@10.0.1/node_modules/commander/lib/command.js:935:5)
 ›       at async file:///home/runner/setup-pnpm/node_modules/.bin/global/5/.pnpm/netlify-cli@17.36.4_@types+node@22.7.5/node_modules/netlify-cli/bin/run.js:27:3
zanhk commented 1 month ago

Is there any workaround?

peschee commented 1 month ago

Is there any workaround?

Yes, just pin the cli to the latest working version for now…

zanhk commented 1 month ago

Ok thanks