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
I have a typescript project that uses "yeoman-environment" dependency (version 2.8.0).
When I try to run the project's tests with 'npm run test' I receive the following error: "Error: Cannot find module 'C:\Users<User><project_name>\src\app\index.js' ".
This error appears on windows platform but not on Mac.
After I downgrade to v2.7.0 the project runs fine.
The index.ts file exists (C:\Users<User><project_name>\src\app\index.ts) in the project, as well as a mapping to the index.js file
After investigation I found that the following code was added to 'environment.js' file on v2.8.0 (lines 693-697): let resolved; // Win32: moduleId is resolving as moduleId.js or moduleId.json instead of moduleId/index.js, workaround it. if (process.platform === 'win32' && path.extname(moduleId) === '') { resolved = require.resolve(path.join(moduleId, 'index.js')); }
I have a typescript project that uses "yeoman-environment" dependency (version 2.8.0).
When I try to run the project's tests with 'npm run test' I receive the following error: "Error: Cannot find module 'C:\Users<User><project_name>\src\app\index.js' ".
This error appears on windows platform but not on Mac.
After I downgrade to v2.7.0 the project runs fine.
The index.ts file exists (C:\Users<User><project_name>\src\app\index.ts) in the project, as well as a mapping to the index.js file
After investigation I found that the following code was added to 'environment.js' file on v2.8.0 (lines 693-697):
let resolved; // Win32: moduleId is resolving as moduleId.js or moduleId.json instead of moduleId/index.js, workaround it. if (process.platform === 'win32' && path.extname(moduleId) === '') { resolved = require.resolve(path.join(moduleId, 'index.js')); }
I think that might be the cause of the problem.
A link to the repository: https://github.wdf.sap.corp/devx-wing/generator-ui-5-simple
The text was updated successfully, but these errors were encountered: