You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After making this change, the error was resolved, and the tests ran without issues.
Upon further investigation, I discovered PR #708 and learned that for Node.js versions prior to 21, commands with double quotes around file paths don't work correctly, and such versions (without double quotes) can only identify files at the first directory level. However, in Node.js versions 21 and later, commands work both with and without double quotes. Moreover, using double quotes allows files at deeper directory levels to be recognized.
TL;DR: To run tests reliably, use Node.js version 21 or newer.
Link to code that reproduces the bug
No response
Expected Behavior
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Fastify version
4.28.1
Plugin version
No response
Node.js version
18.20.4
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
Linux Mint 21.3
Description
After running the following commands:
fastify generate fastify-test --lang=ts cd fastify-test npm install
I encountered an error when executing the
npm test
command:To fix this issue, I modified the
test
script inpackage.json
by removing the double quotes around the file path:After making this change, the error was resolved, and the tests ran without issues.
Upon further investigation, I discovered PR #708 and learned that for Node.js versions prior to 21, commands with double quotes around file paths don't work correctly, and such versions (without double quotes) can only identify files at the first directory level. However, in Node.js versions 21 and later, commands work both with and without double quotes. Moreover, using double quotes allows files at deeper directory levels to be recognized.
TL;DR: To run tests reliably, use Node.js version 21 or newer.
Link to code that reproduces the bug
No response
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: