简体   繁体   中英

I am unable to run my angular application

I cloned the ever repo and i was trying to run the admin site but it didn't. The first problem was related to symlinks or shortcuts, implying the developers only had linux in mind and not windows. So i manually created and got it to work. But another error happened when i try to run the admin site made in angular

ERROR in app/@core/auth/auth.module.ts:6:29 - error TS2307: Cannot find module 'environments/environment'.

6 import { environment } from 'environments/environment';
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~

This is the error and others just like this one. When i looked for the file, it didn't exist. So can anyone tell me if the file is generated on compile time. And this project worked fine on ubuntu before without any of the problems mentioned above.

The issue is due to the environment.ts file doesn't exist on the repo, instead, they have model.ts inside environment folder. Replace the import statement in app/@core/auth/auth.module.ts .

EDIT Read the documentation about how to run each project as stated comment .

Run yarn ts-node ./scripts/configure.ts and configure.ts generates automatically environment.ts file with setting defined in .env file (or default if you don't have .env.ts file at all)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM