Node Sass error in Angular: Mixins may not be defined within control directives or other mixins - node.js

I have a project written in Angular 4 and I am trying to build it, but I keep getting this error: Mixins may not be defined within control directives or other mixins.
I've looked around on the internet and I saw some recommendations to downgrade node-sass to the version 4.8.1, but when I tried to do this, I got a 404 erro from Github:
> node-sass#4.8.1 install c:\my-project\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node":
HTTP error 404 Not Found
And sure enough, this address: https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node doesn't exists. My guess is because there are new versions of node-sass available and the 4.8.1 was pushed back to the second page: https://github.com/sass/node-sass/releases?after=3.5.3.
I know that I am using a very old version of Angular and I have plans to upgrade it, but I don't have the time to do this now, has someone managed to solve this?

Download win32-x64-64_binding.node, put in the local:
C:\Users\{username}\AppData\Roaming\npm-cache\node-sass\4.8.1\
Then install again.

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.

Compatibility issues Node and Strapi4

allow me to walk you through some problems I'm encountering when setting up Gatsby with Strapi. Hopefully, somebody can provide me with a solution. Whenever I use the following command yarn create strapi-starter strapi-test gatsby-blog I get the following error:
So what I do next is switching to node v15 using nvm to make strapi compatible with node. The result being that some packages are being installed followed by yet another compatibility error:
Therefore, I am wondering what I am doing wrong and how to make strapi4 compatible with node without having the errors above?
Use Node.js v16 rather than v15. It should fix the issue.
Besides, it's better to use even-numbered version of Node.js, as they're LTS.

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.

react-native attempting to resolve built-in fetch function

I'm attempting to use the fetch function in react-native to grab a piece of data from the web. from what I understand reading the docs, the fetch function is built in to react-native.
when doing so, I get the module resolution error in the attached screenshot, where for whatever reason the react-native bundler is attempting to use the fetch provided by typescript from my ~/.cache directory.
I've previously had typescript 2.6 installed globally via npm, I uninstalled it to see if that might fix things, but the error persists.
I should note that the only things I've done for this project are to create it with create-react-native-app, add a little snippet to the App.js component stolen from the react docs to fetch some JSON, and yarn run eject the project (this error persisted before and after the ejection)
well in my turkey-induced frenzy, it appears I hadn't properly uninstalled the global typescript install on my computer.
having done so properly, the issue is resolved;
however the issue of react-native's module resolution strategy being incompatible with a global typescript installation persists.

Noflo example : Running inside browser

We are trying to get a simple noflo example running inside a browser as described the noflojs.org/documentation/fbp/ [Language for Flow-Based Programming]
We tried to refer to some examples available on GitHub
github.com/noflo/noflo-browser-app
github.com/noflo/noflo-websocket
github.com/bergie/flowcopter
We tried npm install; grunt build. We get the below error and are not able to proceed beyond this:
Running "noflo_browser:build" (noflo_browser) task install
noflo/noflo#master Warning: dns lookup failed Use --force to
continue.
Any idea what are we missing ?
At the time of the question the build setup for the projects mentioned was still based on Component.js which had become unmaintained.
Nowadays we're using NPM for installing dependencies and WebPack for browser builds.
Suggested fix would be to fetch the latest versions of these repos, do npm install and build again. This will bring the build up to spec.
If you're using the old build setup in your own projects, this PR is a handy example on what to change to go from Component.js to WebPack.

Resources