angular-cli error using angular 4 & angular2-materialize --HarmonyImportDependency - javascript

cli. It was working fine untill I decided to install angular2-materialize with it had to install dependencies. After that compliation broke and i keept getting the error shown in the error. I am trying to figure out when angular-cli builds the project where the reference is so I can remove it.
Please let me know how to take care of this error.
Thanks

Related

Cannot read property 'ApolloProvider' of undefined

I am trying to compile my React Native application version 0.64.0. Everything was ok after migration from javascript to typescript, but suddently I got this problem:
Screenshot to compile
I tryied delete node modules and yarn again, and I didn't get any success compilation.
I also I have this error on console:
Error on console
I don't know if I have to install anything else, please help me.
This is my apollo client version:
"#apollo/client": "^3.3.13",

Vue cli using webpack 4 instead of 5 by default

I am trying to get an app up and running with Vue 2 and everything was fine until I tried using the node-sass and sass-loader packages. I started getting errors and after investigation, it looks like I need to be using webpack 5+ for the latest node-sass package to work. After poking around it looks like when I created the project it defaulted to webpack version 4.46.0.
I updated my vue-cli to the latest version as per the instructions on the official page and then tried re-initializing a new project and still have the same issue. Currently, I have #vue/cli 4.5.12 which looks to be the latest (I think).
I am initializing the app with vue create <app-name> and I am using the default configs. I did find this page which says "migrating from v4" which perhaps implies there might be a higher version of vue-cli but again I followed all the instructions to no avail, so not sure if I am just missing something here.
I am pretty novice in Vue and not sure what additional info I should provide to make this useful, but I've searched all over and for the life of me cannot figure out what is going on.
From what I found out on GitHub, the latest stable version - 4.5.12 - of Vue CLI still uses Webpack 4: https://github.com/vuejs/vue-cli/blob/v4.5.12/package.json .
Considering that, the easiest solution in my opinion would be to just downgrade sass-loader to version 10 with npm install sass-loader#10 for example, as suggested here: https://stackoverflow.com/a/66087132/1505369.
You could try using a beta version of vue-cli, as I tried, by updating both #vue/cli-service and, I believe, all the vue-cli plugins to version 5.0.0-beta.0, with npm install #vue/cli-service#5.0.0-beta.0 #vue/cli-plugin-babel#5.0.0-beta.0 #vue/cli-plugin-eslint#5.0.0-beta.0 #vue/cli-plugin-vuex#5.0.0-beta.0. It should end up installing and using Webpack 5. For me personally though, it hasn't really solved the issue, as the new error occurred:
ERROR TypeError: The 'compilation' argument must be an instance of
Compilation TypeError: The 'compilation' argument must be an instance
of Compilation
// ...

Why am I getting a "Cannot read property 'length' of undefined" error when I try to install React-Bootstrap using "npm i react-bootstrap"?

I'm following a full-stack MERN tutorial, and after using the "npx create-react-app" command to create the react application smoothly, everything is compiling & running properly, but as SOON AS I try to install the React-Bootstrap library using the regular "npm i react-bootstrap" in the command line of Visual Studio Code OR Windows CMD, I'm getting the "Cannot read property 'length' of undefined". Could somebody PLEASE explain how to get rid of that error so that I can install React-Bootstrap? I'm unable to proceed further, and I would really appreciate if someone could help me out!
So one of the users in the comments suggested installing the "LTS" version of Node.js, instead of the one that's shown with "latest features" on their website. And indeed, installing the LTS version of Node.js fixed the problem! I don't understand though, how literally, an updated version of Node.js with "latest features" could throw errors/get stuck on installing libraries via npm. Regardless, this particular issue has now been resolved.
Updating Node using nvm install --lts solved it for me and I was able to install the package.

Angular | Import JavaScript library into component

I am trying to use the package YoastSEO inside of my Angular project so I can replicate what it does in WordPress.
The package via NPM is actually a JavaScript library.
Reading online it tells me that I should do import * as YoastSEO from 'yoastseo' which I have done.
However, when compiling the angular app with ng serve I get the error
ERROR in ./node_modules/yoastseo/node_modules/htmlparser2/lib/WritableStream.js
Module not found: Error: Can't resolve 'stream' in 'admin-panel\node_modules\yoastseo\node_modules\htmlparser2\lib'
I have never come across this issue before and I have tried to do npm i htmlparser2 as a bit of a long shot to see if that would fix it put it doesn't seem too.
Any help would be greatly appreciated whether this being a new npm package to use or how to fix this issue.

Error: Cannot find module "rxjs/operators" in Ionic Angular

Im trying to run my Ionic project. It was working fine until some days ago, now I just can't run it, whatever I do. this error shows up! I tried removing Rxjs from package.json and node_modules, also commented out all the place I used Rxjs, still this error shows up. Tried in Ubuntu 16.04 with Node 8.9.0 and npm 4.5.0.
Also tried the same running in windows still shows the same error! How do I fix this?
try reinstalling rxjs of version 5.5.3 or newer
npm install #reactivex/rxjs#5.5.3
this issue seems to be fixed in version 5.5.3 https://github.com/ReactiveX/rxjs/issues/2971

Categories