Just starting with Angular and Typescript, I attempted to run e2e testing on my Angular project using the "ng e2e" command, but encountered an error that reads:
E/launcher - Error: Error: Cannot find module 'src/environments/environment'
I searched through related posts on SO for a solution, but none of them seemed to work or provide an answer. I tried adjusting the relative path of the import to "../environments/environment" and "../../environments/environment," but the issue persisted.
Even moving the environments folder into the e2e/src directory did not solve the problem.
Could this be due to the presence of 2 src folders?
Any suggestions would be greatly appreciated.
The error is specifically pointing to my app.e2e-spec.ts file, which you can see blurred in the screenshot below (for privacy):
https://i.sstatic.net/kuNdX.jpg
In my app.e2e-spec.ts file, the environment import resolves properly:
https://i.sstatic.net/5Qfhi.jpg
Here's the simplified structure of my project: