Skip to content
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

Use NETLIFY_BUILD_VERSION constant #46

Merged
merged 1 commit into from
May 26, 2020
Merged

Use NETLIFY_BUILD_VERSION constant #46

merged 1 commit into from
May 26, 2020

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented May 26, 2020

This plugin tries to find out Netlify Build's version by using require('@netlify/build'). However this crashes in production with Cannot find module '@netlify/build/package.json'.

The reason this does not work is outlined in netlify/build#1363.

I just added support for a new constant NETLIFY_BUILD_VERSION (netlify/build#1364), which is a string with the major.minor.patch version of @netlify/build.

At the moment, this constant is undefined, but this should become available within 24 hours. Also, having it undefined is probably better than the current behavior (the build crashes).

@Munter
Copy link
Owner

Munter commented May 26, 2020

Thank you :D

@Munter Munter merged commit 8a9c79f into Munter:master May 26, 2020
@Munter
Copy link
Owner

Munter commented May 26, 2020

Published in v5.0.2. Seemed rather important :)

@ehmicky ehmicky deleted the chore/use-netlify-build-version-constant branch May 26, 2020 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants