export 'CHART_TOOL_PANEL_ALLOW_LIST' (imported as 'CHART_TOOL_PANEL_ALLOW_LIST') was not found in 'ag-grid-community' - ag-grid

We are changing an Ag Grid Community component to Enterprise, for which we ran the respective npm command
npm install --save ag-grid-enterprise
added the import to the enterprise
import { AgGridReact } from 'ag-grid-react';
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
import 'ag-grid-enterprise';
import 'ag-grid-community/dist/styles/ag-grid.css';
the expectation was we get enterprise features onboard but now we get to see some error
package.json also looks fine

Found the solution for this issue, this was happening because we need to have the same version of ag-grid-community and ad-grid-enterprise once upgraded both of them to V29, then it worked like a charm.

Related

VSCode Pylance can't find import

I'm using Django.
The issue happens when I import a module I defined like so import project.helpers.
If I import project.helpers as helpers it works fine.
Any solutions to this?

ionic - export 'IonicStorageModule' was not found in '#ionic/storage'

I want to use storage in ionic (based on angular), so I did all that described here: https://ionicframework.com/docs/v3/storage/ and import it like this:
import { IonicStorageModule } from '#ionic/storage';
but I get this error:
export 'IonicStorageModule' was not found in '#ionic/storage'
My ionic version is 6.13.1.
The use of storage was changed in ionic and now you need to import it as following:
import { IonicStorageModule } from '#ionic/storage-angular';
As described in details here: https://github.com/ionic-team/ionic-storage
For angular need to install as
npm install --save #ionic/storage-angular
Then
import { IonicStorageModule } from '#ionic/storage-angular';

Warning in ag-Grid: You are mixing modules (i.e. #ag-grid-community/core) and packages (ag-grid-community)

i'm using these npm modules for the ag-grid:
"#ag-grid-community/react": "^25.0.1",
"#ag-grid-enterprise/all-modules": "25.0.1",
"ag-grid-community": "^25.0.1",
"ag-grid-enterprise": "^25.0.1",
"ag-grid-react": "^25.0.1",
and these imports :
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { AgGridReact } from 'ag-grid-react';
import 'ag-grid-enterprise';
import { ModuleRegistry, AllModules } from '#ag-grid-enterprise/all-modules';
import '#ag-grid-community/all-modules/dist/styles/ag-grid.css';
import '#ag-grid-community/all-modules/dist/styles/ag-theme-material.css';
import { LicenseManager } from '#ag-grid-enterprise/core';
LicenseManager.setLicenseKey(
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
);
ModuleRegistry.registerModules(AllModules);
Why i'm getting this warning in the console and how i can get rid of it ?
ag-Grid: You are mixing modules (i.e. #ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms.
You only need the following in your package.json file as these packages contain all the code you need following the AG Grid 'package' approach.
"ag-grid-community": "^25.0.1",
"ag-grid-enterprise": "^25.0.1",
"ag-grid-react": "^25.0.1",
From the docs
It is important that you do not mix packages and modules in the same
application as this will result in AG Grid being included twice and
doubling your bundle size! All modules are scoped by either
#ag-grid-community/* or #ag-grid-enterprise/* and should not be mixed
with the standalone packages of ag-grid-community and
ag-grid-enterprise.
Modules
Packages
#ag-grid-community/xxxxx
ag-grid-community
#ag-grid-enterprise/xxxxx
ag-grid-enterprise
I have written about this more in this blog post.
You are getting the warning because quite simply, you are mixing modules and packages. The library ag-grid-community contains everything in ag-Grid community whereas #ag-grid-community/core contains the core items from ag-Grid community. You need to install one or the other, depending on whether you are using modules or packages.
From ag-Grid:
There are two main ways to install ag-Grid - either by using packages
, or by using modules. packages are the easiest way to use ag-Grid,
but by default include all code specific to each package, whereas
modules allow you to cherry pick what functionality you want, which
will allow for a reduced overall bundle size.
Take a look at the documentation around packages and modules here.

module in material-ui not longer found

It's been running fine for several months now, but since I've re-installed the node_modules folder I got this error.
Module not found: Can't resolve 'final-form-material-ui/dist' in '....'
package.json
...
"dependencies": {
"#material-ui/core": "^3.9.3",
"#material-ui/icons": "^3.0.2",
...
In the component, i use:
import {TextField, Input} from 'final-form-material-ui/dist';
And in the node_modules/final-form-material-ui/dist folder I do have the TextField.d.ts and the Input.d.ts files.
Any clues?
You need to import the right package from #material-ui/core.
import {TextField, Input} from '#material-ui/core';
changed as suggested / asked / queried by HRK44
import {TextField, Input} from '#material-ui/core';

IONIC 3: Plugin BackgroundMode dont work: Object(…) is not a function

I need to run the code “this.backgroundMode.enable()” in my project, but it shows me the following error:
"Object(...) is not a function"
It imports it in app.module.ts in the following way:
import {BackgroundMode} from '# ionic-native / background-mode / ngx';
...
providers: [
...
BackgroundMode
...]
And in the page (in my case is in app.component.ts, after deviceready, like the official documentation says) i use like:
import {BackgroundMode} from '# ionic-native / background-mode / ngx';
constructor(private backgroundMode: BackgroundMode) { }
...
this.backgroundMode.enable();
Please I need to run this plugin in my project
I have answered a similar question here https://stackoverflow.com/a/54398403/6617276
Check your project type in ionic.config.json file.
If the type is "ionic-angular", then install 4.x.x version.
npm i -s #ionic-native/background-mode#4.20.0
If the type is "angular", then install 5.x.x-beta version
npm i -s #ionic-native/background-mode#5.0.0-beta.24
Note:
Add ngx at the end of import only if you are using Angular 6
import { BackgroundMode } from '#ionic-native/background-mode/ngx';
if not remove ngx from the import both in app.module.ts and app.component.ts
import { BackgroundMode } from '#ionic-native/background-mode';