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

fix: fix production builds #5380

Merged
merged 1 commit into from
May 16, 2023
Merged

fix: fix production builds #5380

merged 1 commit into from
May 16, 2023

Conversation

richardlau
Copy link
Member

@richardlau richardlau commented May 16, 2023

Move cross-env from devDependencies to dependencies to fix production deployment.

Description

According to https://nodejs.org/github-webhook.log, production builds of the website are broken:

stderr: npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
stderr: npm WARN config production Use `--omit=dev` instead.
stderr: npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 6765ms
stdout: 
stdout: added 576 packages, and audited 577 packages in 34s
stdout: 
stdout: 170 packages are looking for funding
stdout:   run `npm fund` for details
stdout: 
stdout: found 0 vulnerabilities
stdout: 
stdout: > [email protected] deploy
stdout: > npm run build && npm run export
stdout: 
stdout: 
stdout: > [email protected] build
stdout: > cross-env NODE_ENV=production NODE_NO_WARNINGS=1 next build
stdout: 
stderr: sh: 1: cross-env: not found

The production deployment is via a Docker container created by this script which installs via:

npm install --cache-min 1440 --production

which means devDependencies are not installed.

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npx turbo lint to ensure the code follows the style guide. And run npx turbo lint:fix to fix the style errors if necessary.
  • I have run npx turbo format to ensure the code follows the style guide.
  • I have run npx turbo test to check if all tests are passing, and/or npx turbo test:snapshot to update snapshots if I created and/or updated React Components.
  • I've covered new added functionality with unit tests if necessary.

@vercel
Copy link

vercel bot commented May 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2023 5:35pm
nodejs-org-stories ✅ Ready (Inspect) Visit Preview May 16, 2023 5:35pm

Move `cross-env` from `devDependencies` to `dependencies` to fix
production deployment.
package.json Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – nodejs-org May 16, 2023 17:30 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories May 16, 2023 17:32 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org May 16, 2023 17:34 Inactive
@vercel vercel bot temporarily deployed to Preview – nodejs-org-stories May 16, 2023 17:35 Inactive
Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Let's get this merged ASAP

@ovflowd ovflowd merged commit 0f4fadc into nodejs:main May 16, 2023
@richardlau richardlau deleted the buildfix branch May 16, 2023 18:14
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