Generated code in typescript project results in errors as ide thinks the file is missing for the import.

Have a folder of generated code from say openapi-codegen.

Call the script to regen the code while the ide is open. The scripts generally delete the files, then regenerate them.

The issue is, typescript "import x from 'y'" sees that 'y' is not there momentarily.. then adds the red underline error and thinks the file is missing.

However, ctrl+left click the IDE will jump to the said file...

The only way to get the IDE to recognise the file is back is to close the project and open it again.

Is there a better way, or is this a bug?

LinuxMint (latest lts)

PHPStorm (latest from auto update)

 

0
2 comments

Does restarting the Typescript compiler service help?

0
Avatar
Permanently deleted user

Yes this fixes it thank you!

0

Please sign in to leave a comment.