Issue
I started a personal project that using angular 17 in front-side and decided to use ngx-bootstrap. Ngx-bootstrap released a version(ngx-bootstrap@12.0.0) compatible with angular 17. But I got an error that says "Could not find the project main file inside of the workspace config (src)" when downloading ngx-bootstrap.
$ ng add ngx-bootstrap
ℹ Using package manager: npm
✔ Found compatible package version: ngx-bootstrap@12.0.0.
✔ Package information loaded.
The package ngx-bootstrap@12.0.0 will be installed and executed.
Would you like to proceed? Yes
✔ Packages successfully installed.
✅️ Added "bootstrap
✅️ Added "ngx-bootstrap
Could not find the project main file inside of the workspace config (src)
I tried to download again but got same error.
Solution
An issue has already been created on ngx-bootstrap
github page So you can just use ng-bootstrap
as per their suggestion which actually works great!
This is the code
that breaks the command. It seems to expect app.module instead of main.ts
export function getProjectMainFile(project: workspaces.ProjectDefinition): string {
const buildOptions = getProjectTargetOptions(project, 'build');
if (!buildOptions.main) {
throw new SchematicsException(`Could not find the project main file inside of the ` +
`workspace config (${project.sourceRoot})`);
}
return buildOptions.main.toString();
}
If you really want ngx-bootstrap only, then you need to install it manually. Here is the installation guide.
Answered By - Naren Murali
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.