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

NX_NEXT_OUTPUT_PATH is missing in baseNXEnvironmentVariables #19044

Closed
1 of 4 tasks
rafal2228 opened this issue Sep 7, 2023 · 2 comments · Fixed by #19201
Closed
1 of 4 tasks

NX_NEXT_OUTPUT_PATH is missing in baseNXEnvironmentVariables #19044

rafal2228 opened this issue Sep 7, 2023 · 2 comments · Fixed by #19201
Assignees
Labels
outdated scope: nextjs Issues related to NextJS support for Nx type: bug

Comments

@rafal2228
Copy link

rafal2228 commented Sep 7, 2023

Current Behavior

When we run build target of newly generated @nx/next app, the CLI complains about usage of NX_ prefixed env variable (although we're not setting such on the user end).

Probably related PR - #18892

Expected Behavior

The CLI should not notify users if they do not use any NX_ prefixed libraries

GitHub Repo

No response

Steps to Reproduce

  1. Generate new @nx/next app
  2. Run build target

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 18.16.0
   OS     : linux-x64
   npm    : 9.5.1
   
   nx (global)        : 16.7.1
   nx                 : 16.7.1
   @nx/js             : 16.8.0
   @nx/jest           : 16.7.1
   @nx/linter         : 16.7.1
   @nx/workspace      : 16.8.0
   @nx/cypress        : 16.8.0
   @nx/devkit         : 16.7.1
   @nx/eslint-plugin  : 16.7.1
   @nx/next           : 16.8.0
   @nx/react          : 16.8.0
   @nrwl/tao          : 16.7.1
   @nx/web            : 16.8.0
   typescript         : 5.1.6
   ---------------------------------------
   The following packages should match the installed version of nx
     - @nx/js@16.8.0
     - @nrwl/js@16.8.0
     - @nx/workspace@16.8.0
     - @nrwl/workspace@16.8.0
     - @nx/cypress@16.8.0
     - @nrwl/cypress@16.8.0
     - @nx/next@16.8.0
     - @nrwl/next@16.8.0
     - @nx/react@16.8.0
     - @nrwl/react@16.8.0
     - @nx/web@16.8.0
     - @nrwl/web@16.8.0
   
   To fix this, run `nx migrate nx@16.8.0`

Failure Logs

Warning, in Nx 18 environment variables starting with NX_ will not be available in the browser, and currently will not work with @nx/next:server executor.
Please rename the following environment variables: NX_NEXT_OUTPUT_PATH using Next.js' built-in support for environment variables. Reference https://nextjs.org/docs/pages/api-reference/next-config-js/env

Package Manager Version

npm - 9.5.1

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@FrozenPandaz FrozenPandaz added the scope: nextjs Issues related to NextJS support for Nx label Sep 8, 2023
@stomvi
Copy link

stomvi commented Sep 13, 2023

Same here.

Screen Shot 2023-09-13 at 8 11 15 AM

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: nextjs Issues related to NextJS support for Nx type: bug
Projects
None yet
4 participants