bit add src/*/ -e 'src/chronos,src/component-loader,src/mini-ngrx,src/positioning,src/spec,src/locale,src/common'
bit add src/chronos src/component-loader src/mini-ngrx src/positioning -n internal
"bit": {
"env": {
"compiler": "bit.envs/[email protected]"
},
"componentsDefaultDirectory": "components/{name}",
"packageManager": "npm",
"resolveModules": {
"aliases": {
"ngx-bootstrap": "src"
}
},
"overrides": {
"*": {
"dependencies": {
"@angular/forms": "-",
"@angular/animations": "-"
},
"peerDependencies": {
"@angular/forms": "^8.0.0",
"@angular/animations": "^8.0.0"
}
}
}
}
This is the error you will get:
BUILD ERROR
alert/alert.component.ts(11,26): error TS2307: Cannot find module 'ngx-bootstrap/utils'.
If applicable, add screenshots, exceptions, and logs to help explain your problem.

@JoshK2 , I have done the exact same steps as above and it's working as expected.
We did have a similar bug where it didn't recognize the alias after running npm run build, but it got fixed in v14.2.1. Make sure that your version is really v14.2.2.

@davidfirst I forget to tell you that sometimes is working and sometimes not.
On my computer, it worked yesterday, and today is not.
@davidfirst I try now to reproduce it on another computer and I update you.
@JoshK2 , do you have this path node_modules/ngx-bootstrap? if so, you were running npm run build before, which still should work, but if not, try to delete it and see if it works.
@davidfirst I removed the node_modules folder, run npm i and bit build alert and it's working.
So I don't know what was the problem with Bit.
I think that I found the solution, I downgrade the version of npm to 6.9.0, and the build process work perfectly on all the components.
@davidfirst let's take a look if it's something we can make work on v6.10 as well. If no, let's close this issue (maybe we can open a bug to npm if we have a proper reproduce for them).
Let's don't waste too much time on this.
@GiladShoham , it's easily reproducible by creating a capsule bit isolate alert --use-capsule -d my-capsule and then running npm i inside the capsule.
With [email protected] it doesn't delete the node_modules/ngx-bootstrap directory. With [email protected] it does.
We have two options here:
bit link to restore the node-modules symlinks/links.@davidfirst It happens also with npm 6.7.0 and 6.10.2.
In general, I would go with both options.
The install package will call the other one internally.
But we want to provide the link functionality as well for my opinion.
@davidfirst @GiladShoham
When its work with npm version 6.9.0 it was with node version 10.16.0.
And now I try with npm version 6.7.0 and 6.10.2 with node 10.16.0, and its also not work.
After that I try npm version 6.9.0 (that work) with node version 10.15.1 and its also not working.
So for now, its work only with node 10.16.0 and npm 6.9.0.
Interesting. For me, [email protected] was working for node 12.0.0 and node 12.7.0.
@GiladShoham , actually there is another option. I can let the compiler pass a list of packages to install on the capsule. Then, this list will be added to the main package.json before npm install is running.
It's the most performant option.
Ended up exposing three more functions for the capsule.
writeLinks, to write all links. installPackages to install NPM packages and then write the links of node-modules.capsuleExec to easily run exec on the capsule, with no need to deal with the childProcess, stdin/stdout etc.There is also a bug in the compiler itself, which doesn't wait for the exec call to complete. As a result, it sometimes shows an error about angular/core is missing.
I fixed the compiler and I'm waiting to get the permission to export it.