Uncaught TypeError: Cannot read property 'id' of undefined at registerNgModuleType - node.js

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.

Related

Webpack loading wrong version of Node Module for Angular project

I have a project in Angular 13. I want to use quillJS and I want to add tables so I tried to install quill-better-table in my project.
For some reason the package is not working. I used the web inspector and found this to be the issue:
ERROR TypeError: quill.keyboard.bindings.Backspace is undefined
The problem seems to be located at: quill_better_table_BetterTable quill-better-table.js:2979 and when I check the debugger I can see the line:
let thisBinding = quill.keyboard.bindings['Backspace'].pop();
quill.keyboard.bindings['Backspace'].splice(0, 1, thisBinding); // add Matchers to match and render quill-better-table for initialization
// or pasting
I found a github repo that had this issue fixed:
https://github.com/LosEcher/quill-better-table
The problem I'm running into is I dont know how to get that particular repo into my project. I have tried updating the current package and webpack continues to load the old one. I've tried clearing the npm cache and reinstalling the node packages.
I found this guide: https://whatapalaver.co.uk/npm-dependency which seems to indicate what I should do but I'm not quite npm literate enough to figure it out. Specifically, I dont know that I understand how to create the NPM link.
I'm looking for advice as to how to fix this package. I am going to be reading up on NPM link but I figured if there was another easier way to get this fixed then I would ask. I can load that repo into my node module folder, but I dont know how to make webpack reload the updated module.
Thanks in advance for the help, let me know what details I for got to add.

TypeError: resolver.resolve is not a function

When trying to truffle compile smart contracts and deploy them to an RPC testnet, I keep encountering
TypeError: resolver.resolve is not a function
at Profiler. (/opt/homebrew/Cellar/truffle/5.3.6/libexec/lib/node_modules/truffle/build/webpack:/packages/compile-common/dist/src/profiler/profiler.js:55:1).
In visual studio code I can't find resolver.resolve anywhere in my code and even cloning projects straight from github it always displays this message when truffle compiling. I have searched everywhere for the resolution and tried debugging myself in the terminal and my current thinking is it's a webpack error but I can't figure out how to solve it. Any help would be greatly appreciated!
I was also in same situation then i find the solution. Follow these steps
Remove node_modules directory & package-lock.json (Not package.json)
Go to your cli & run npm install command
You are done
Hope this solve your problem

angular project npm modules randomly deleted

I have the weirdest problem I've ever seen with npm where in the middle of running an angular ng serve, packages from both node and for angular will randomly go missing. In the middle of a save, the project will suddenly not recompile, and will complain about a missing module. Each time it has been different but so far I have had:
Error: ENOENT: no such file or directory, open '.../node_modules/core-js/internals/hidden-keys.js'
Module not found: Error: Can't resolve '../internals/is-pure' in '/.../node_modules/#angular-devkit/build-angular/node_modules/core-js/internals'
An unhandled exception occurred: Cannot find module './internal/streams/stream
An unhandled exception occurred: Cannot find module '/.../node_modules/minipass-collect/node_modules/minipass/index.js'.
Please verify that the package.json has a valid "main" entry
These have just been errors from the last few days, but issues like this has been happening all. to the point where I need to delete node_modules and reinstall everything via npm at least once a day. I'm thinking the error has more to do with node or NPM than with my Angular set up, as some of these missing packages appear to be node core packages.
I've already tried reinstalling npm globally via npm install -g npm and it hasn't helped anything. I'm afraid that I'm going to have to just reinstall node completely.
Any help would be appreciated, thank you.
EDIT: upon further debugging, I'm noticing that the modules missing are always from #angular-devkit/build-angular/node_modules/core-js/modules. In addition to losing random modules like 'is-pure', the app will also randomly recompile many times when running ng serve
I figured out what was going on, if anyone in the future has the same problem. Turns out the answer has nothing to do with me botching my npm config. I didn't realize that on new Macbooks, any directory in the desktop is automatically managed by iCloud. At some point, probably an older version of the code before I migrated to Angular 9 was syncing the old code into my project. I was able to resolve this issue by changing the name of the parent directory where my project lived from filename to filename.nosync. adding '.nosync' causes iCloud to ignore syncing for whatever is in that file. I know I should have caught this, but hopefully this will help any mac users in the future who are experiencing similar problems.

JHipster - prod build is not working correctly

I worked a lot on my JHipster project. After 3 weeks I packaged the project again and tried to run the war.
The war is running but the problem is that there is a problem with the frontend. It shows the Hipster error "An error has occured :-(...".
The console logs:
Uncaught TypeError: Cannot read property 'concat' of undefined
at Module.503
I'm just confused because when I run npm start, everything works. I didn't change the webpack or package.json. I'm using the newest JH version.
I solved my issue. We are using index files in Angular. The order of the exports was not correct. We exported the module first and the module tried to access data from the index which was not exported at this time.
Hope I could help you.

Ember Cli not compiling with broccoli-emblem-compiler

I am trying to set up this repository locally https://github.com/lrdiv/ember-soundcloud and i have come across to this issue with broccoli-emblem-compiler. See the image in attached
From my understanding the broccoli-emblem-compiler is not able to compile my emblem templates and i don't know how i can figure it out.
These are all the steps i have done to install and set up the project with Ember-Cli
ember new soundcloud
ember install:addon ember-cli-coffeescript
ember install:npm broccoli-emblem-compiler
I have deleted the app folder and replace with the project https://github.com/lrdiv/ember-soundcloud that i have cloned
then i have installed the other node modules required
ember install:npm broccoli-static-compiler
ember install:npm broccoli-merge-trees
ember install:npm install body-parser
and at the end i run
ember server , and in my terminal i get that error i have attached.
What can i do now to sort this out? What's really the problem?
I did many things to try to fix this. One was replacing the project broccoli-emblem-compiler with this line in the project settings:
"broccoli-emblem-compiler": "git+https://github.com/cascalheira/broccoli-emblem-compiler.git"
At some time the error went away, I think it was when I used this repository. It is mentioned in the other issues.
I ran into problems with broccoli-emblem-compiler, but just had success with ember-cli-emblem-hbs-printer -
https://github.com/201-created/ember-cli-emblem-hbs-printer
I was able to solve this by specifying a version of emblem.js in my package.json file.
Specifically, I added the following line:
"emblem": "0.3.14"

Resources