I have an Electron Angular 2.1.1 application built on top of the Angular Seed Advanced seed project. This was started over a year ago, and recently when attempting to deploy the code to a new system I sometimes run into a series of errors. My code deploy and build process with errors is as follows:
- Clone repo latest version of code to local folder.
- I run
sudo yarn
to build the required packages.
During this process I notice this warning: npm WARN gentlyRm not removing /Users/Shared/symplyUltra/node_modules/.bin/tsc as it wasn't installed by /Users/Shared/symplyUltra/node_modules/typescript
Then the yarn fails with
npm ERR! May not delete: /Users/Shared/symplyUltra/node_modules/.bin
The error log shows:
19854 error May not delete: /Users/Shared/symplyUltra/node_modules/.bin
There was no node_modules folder before I began this process, so yarn is creating the .bin folder and then failing because it cant delete the .bin folder that its creating. If I manually delete this folder and re-run yarn I get the same result.
Since this fails, I try sudo npm i
Again I get a lot of errors from gentlyRm npm WARN gentlyRm not removing ...
but overall it finishes.
When I try to start the application in electron I get this error:
index.html:68 Error: (SystemJS) Can't resolve all parameters for NgbRadio: (NgbRadioGroup, NgbButtonLabel, ?, ElementRef).
Error: Can't resolve all parameters for NgbRadio: (NgbRadioGroup, NgbButtonLabel, ?, ElementRef).
The piece of this that is strange is that I have 2 systems where I've deployed this code with no issue at all, and another 2 systems having this same exact issue. I cant find anything different between the systems, and since the code works fine on other systems, I'm confident this issue is an issue with the node_modules not being built correctly.
The only thing that has worked so far in 1 instance was to completely reformat the entire computer and start from scratch. When doing that everything installed just fine.
Can anyone help me understand whats causing this error and how to resolve this?