Angular 13 generate Component Showing Nothing to be done - components

While Generating New component in angular 13 through cmd
ng g c comp1
Showing "Nothing to be done"
Any suggestion....

Make sure you are in a project directory or not.
see what I did.

Related

Angular custom library module not found after updating to version 15

I have updated my custom library and UI Angular applications to version 15 but now when I try to run "ng serve" it says it can't find the module for my custom library. We are working with Artifactory for our repositorys. And I noticed that since I updated the Jenkins build to use Node 16 it packages the npm package differently.
So I'm curious if anyone has come across this before. I was able to consume the library without any issues when it was version 11, but after the update to 15 I get the following error.
Error: Module not found: Error: Can't resolve '#cto_compliance_amf/amf-library' in 'C:\Users\zkafpf7\Documents\MyProjects\amf_ui\src\app'
Any and all help is appreciated.
Turns out that when I updated to Node 16 for the Jenkins build, the babel script wasn't working correctly. I updated my pre-pack script to use shx instead of babel to move the files from the dist folder to the root folder. Then updated the .npmignore file to omit the files that weren't needed in the package. And now everything works. Hope this helps someone else.

Uncaught TypeError: Cannot read property 'id' of undefined at registerNgModuleType

I have a problem that when I clone my repository of the app in angular, after installing the node_module and executing the ng serve it throws me this error and I have already looked for a thousand and one answers but none are correct, the app is from angular 8.1 and my angular global is 11 I do not know if it can influence, but it is with the only angular project that happens to me, at times the ng serve lifts the project and it can be seen but I barely make a modification and I give it save this error appears, I need help that advice me give?
enter image description here
I had the same problem.
I solved the problem by disabled the Angular Language Service for that workspace.
I hope this solves your problem
I could find the error, it turns out that VS code as editor every time I ran the npm install and then the ng serve ran perfect, one time I make a modification and give it ctrl + s it bugea my project and when I run the ng serve me again I get the error, so I had to clone my repository again and work with sublime text and it did not give me the error. It must have been some vscode plugin that makes this happen but it is with very few projects.

ng g c componentname - read-only

I'm using WebStorm.
via Terminal I tried to create new component
Typed:
sudo ng g c componentname
New component has been created,
but I'm not able to edit elements, e.g. to add new sub directory, etc,
because I'm getting error that component is read-only
I'm not sure how I can remove that status, or how can I avoid this to happen again?
To create a component, you don't need sudo. Simply type ng g c componentname.

WebStorm stuck on /usr/local/bin/node after update

I did an update of WebStorm this morning. Since the update, my project will no longer run properly. It gets stuck on /usr/local/bin/node, nothing else gets executed. Does anyone else have this issue?
More specifically, I am talking about the green 'run node app.js' arrow button on the top right. I have set the run configuration to always do node app.js but that button is not working anymore. If I go into terminal and manually type in node app.js, the project will run.
Screenshot of run configuration:
Since it's complaining about the working directory, I'd look at fixing that. But you also need to specify the file you want to run in the JavaScript file: input

Facebook and google maps plugins don't work together in PhoneGap app

I am going to create the app that shows google map and required social login with facebook.
I decided to use:
https://github.com/Wizcorp/phonegap-facebook-plugin
and
https://github.com/wf9a5m75/phonegap-googlemaps-plugin
I don't know what is a reason, but these plugins perfectly work alone, but when I installed them together I got next error:
BUILD FAILED
C:\Users\{USER_NAME}\AppData\Local\Android\sdk\tools\ant\build.xml:577: Jar mismatch! Fix your dependencies
Total time: 1 second
{APP_PATH}\platforms\android\cordova\node_modules\q\q.js: 126
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant debug -f {APP_PATH}\platforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR running one or more of the platforms: Error: {APP_PATH}\platforms\android\cordova\run.bat: Command failed with exit code 8
You may not have the required environment or OS to run this project
I am not experienced in PhoneGap development, but I guess that both plugins are doing some changes in platform dependencies (and rewriting changes of another plugin).
Could anybody help me with this?
I got the answer of google-maps plugin creator:
The facebook plugin contains android-support-v4.jar, and the map
plugin installs another android-support-v4.jar.
Remove one of them.
I took off android-support-v4.jar from com.phonegap.plugins.facebookconnect folder and left it in libs folder. It was solved my issue (fb and g-maps work together).
So I can mark this question as closed now.
I leave this answer for anybody who meets this issue like me.

Resources