Skip to content

NODE_OPTIONS=--no-deprecation: not found #36

Closed

Description

@okey00

Running via WSL2 on Windows 11 and receiving the following error...

codex: 15: exec: NODE_OPTIONS=--no-deprecation: not found

Activity

  1. mfrancis107 commented on Apr 16, 2025

    @mfrancis107

    Mac also

  2. LucasArmand commented on Apr 16, 2025

    @LucasArmand
    1. cd to /mnt/c/Users/yourname/AppData/Roaming/npm
    2. open the codex file with editor of your choice (i.e. vim, nano)
    3. Find this line (around line 15):
      exec NODE_OPTIONS=--no-deprecation node ...
    4. Replace it with two lines instead:
    export NODE_OPTIONS=--no-deprecation
    exec node ...
    

    ... is the rest of the code after the --no-deprecation flag in the original line

  3. jonchurch commented on Apr 16, 2025

    @jonchurch
    Contributor

    This ultimately is coming from the shebang here

    #!/usr/bin/env -S NODE_OPTIONS=--no-deprecation node

    looks like a portability issue? I dont see the error on mac os 15.3.2

  4. okey00 commented on Apr 16, 2025

    @okey00
    Author

    Thanks Lucas for the quick response. That worked

  5. jonchurch commented on Apr 16, 2025

    @jonchurch
    Contributor

    @okey00 That's a workaround, not a fix. You should keep this issue open until root cause is determined and a fix merged

  6. dahifi commented on Apr 16, 2025

    @dahifi

    I did a patch in my bin folder so that I wouldn't have to edit the npm package. I've put in a PR that might fix this, hopefully. #42

  7. reopened this on Apr 16, 2025
  8. okey00 commented on Apr 16, 2025

    @okey00
    Author

    Reopened as suggested by Jon as it's a workaround in it's current state.

  9. tibo-openai commented on Apr 16, 2025

    @tibo-openai
    Collaborator

    This was fixed by #96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions