My current project is utilizing Angular 8
When I attempt to run 'ng build --prod', my project encounters errors.
ERROR in The "path" argument must be of type string. Received type undefined
The issue arose after adding "enableIvy": true to the tsconfig.app.json file
"angularCompilerOptions": {
"enableIvy": true
...
}
This adjustment caused an error, seen here: https://i.sstatic.net/f5ztY.png
After investigating, it became clear that the error was originating from a custom Angular library I had created. Upon deleting the library, the error disappeared and my project compiled successfully.
Here is an example of importing the library:
Check out the source code for my library here:
import { SmartUiSharedLibsModule } from 'smart-ui-shared-libs';
Prior to this issue, my project never encountered any errors during builds.
The main reason for these errors is my desire to use Ivy rendering capability.
I am currently working on resolving this problem by adjusting the path as follows:
import { SmartUiSharedLibsModule } from 'smart-ui-shared-libs/lib/smart-ui-shared-libs.module';
By making this change, my project now compiles successfully.
It seems that certain paths within my library were affected when enabling Ivy:
import { ... } from 'smart-ui-shared-libs';
However, changing the import path to include '/lib/smart-ui-shared-libs.module' resolved the issue:
import { ... } from 'smart-ui-shared-libs/lib/smart-ui-shared-libs.module';
Previously, without enabling "enableIvy", the original path still functioned properly for my library.