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

[Bug]: changes to path env variable seem not to be used (in connection with ffi-napi and Windows) #13730

Closed
mathiasbockwoldt opened this issue Jan 4, 2023 · 2 comments

Comments

@mathiasbockwoldt
Copy link

Version

29.3.1

Steps to reproduce

  1. Clone repo https://github.com/mathiasbockwoldt/jest-bug-example
  2. cd jest-bug-example
  3. npm install
  4. node index.js (should print path and dll version without error)
  5. node .\node_modules\jest\bin\jest.js --silent=false (should print same path but error "Dynamic Linking Error: Win32 error 126" which means that the dll could not be found, which is due to the path env variable not being set correctly)

Make sure to run steps 4 and 5 not in a terminal from within VSCode, as VSCode injects the current path to the path env variable.

Expected behavior

I expect the test run with jest to work without error.

Actual behavior

Using jest to run, the index.js will print the correct path env variable, but behave as if the path env variable was not set correctly.

Additional context

Maybe connected: #3552

Some more context is described in the readme in the repo https://github.com/mathiasbockwoldt/jest-bug-example

Environment

System:
  OS: Windows 10 10.0.19045
  CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
Binaries:
  Node: 18.12.1 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
  npm: 8.19.2 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
npmPackages:
  jest: ^29.3.1 => 29.3.1
@mathiasbockwoldt
Copy link
Author

Sorry folks, looks like the problem was on my side. I looked at the wrong places. The path variable was fine all along also in jest, but some lines above, I try to include a dll with a relative path and that won't work with jest and also not from any arbitrary script that might include my script.

@github-actions
Copy link

github-actions bot commented Feb 6, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant