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
Describe the bug
During the run test in jest, I get an error "Cannot find module 'ts-node' from 'parser.js'". I figure out the problem disappears when I commented on these lines in parser.js file.
It appears, that:
the require.extensions is deprecated
the require.extensions object has only the following keys: .js, .json, .node. It doesn't have the .ts key
Tests and src codebase is in typescript, including config files.
Expected behavior
A clear and concise description of what you expected to happen.
Please tell us about your environment:
node-config version: 3.3.6
node-version: 16.16.0
ts-node version: 10.9.1
Other information
The text was updated successfully, but these errors were encountered:
Other people are not reporting this problem outside of Jest, so it's not clear it's a node-config bug.
Yes, require.extensions is deprecated, but no one has proposed a better solution here.
There seem to be competing ways of loading TypeScript files. Some more related discussion is here: #530
Considering there's been no activity here since last October, it seems the issue may be isolated to how Jest is loading node-config and not a general problem, so I'm closing this.
Describe the bug
During the run test in
jest
, I get an error "Cannot find module 'ts-node' from 'parser.js'". I figure out the problem disappears when I commented on these lines inparser.js
file.It appears, that:
require.extensions
is deprecatedrequire.extensions
object has only the following keys: .js, .json, .node. It doesn't have the .ts keyTests and src codebase is in typescript, including config files.
Expected behavior
A clear and concise description of what you expected to happen.
Please tell us about your environment:
Other information
The text was updated successfully, but these errors were encountered: