I've found myself in a strange predicament—after a recent upgrade to my local app dependencies, the application breaks whenever I make reference to the node process object. Specifically it throws the following errors:
Babel Error: Cannot find module '#babel/plugin-proposal-logical-assignment-operators'
So far, I've tried to resolve this issue with a yarn add of the missing dependency, without success. Could anyone shed light on the issue at hand, or how I might be able to resolve it?
Thanks for your consideration.
I resolved this issue by deleting node_modules and running yarn install.
Related
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.
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.
Yarn unable to add packages (both inside and outside workspaces)
Hi there, I'm using Yarn 2, I don't seem to be able to install any package. I always get the following formatted error:
$ yarn add useful-package
➤ BR0027: useful-package#unknown can't be resolved to a satisfying range
➤ Errors happened when preparing the environment required to run this command.
I have tried both inside a project that uses yarn's workspaces and outside in another test project.
This occurs with any package I try and Googling around I can't seem to find any relevant hits yet for this error message here.
What do you reckon the issue may be?
Best,
Matt
Turns out I'd hit a Node JS version conflict with Yarn 2.
Make sure to use latest Yarn (berry/2) with a node version V10.19.0 or greater.
I hope this helps someone!
Best,
Matt
I have an angular 4 application using webpack. When i try to run in in my amazon server i get this error. Works fine in my local. Any idea why this is happening? Thanks a lot for your help.
This is a valid question and I don't see why some people would downvote it.
Anyway I fixed the problem. My package.json had #angular/compiler-cli in the dependencies. Removing that solved the problem. I have #angular/compiler-cli in the devDependencies. Problem was faced only on ec2 machine.
I am configuring my Angular 4 app to build using AoT for production, as described in this post and GitHub repository.
There have been lots of errors in this process, mainly pertaining to #types which I have resolved, but there is one curious error that remains when running npm run build:prod:
ERROR in Could not resolve "./app/src/app.module.ts" from "./app/src/app.module.ts".
I have no idea how to solve this, and Googling yields meager results. Can anyone help me out with what this might mean and how to solve it?
I don't know if it's a tsconfig.json error or otherwise. Can anyone help?