I am getting ../ag-grid-enterprise/main has no exported member grid/grid-options.
import { Grid, GridOptions } from "ag-grid-enterprise";
I have installed ag-grid-enterprise version and already mentioned license key
Module ag-grid-enterprise does not have these members.
GridOptions exist in other module.
try next import:
import { GridOptions } from '#ag-grid-community/core';
ps: v.23
Related
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.
Okay, so I ran the command "ns migrate" to use a newer version of nativescript. What this does is remove the tns-core-modules dependency, which means I can't use it to import things anymore. Supposedly we're supposed to use #nativescript/core instead, but the problem is when I try to import objects #nativescript/core doesn't work and I'm greeted with "cannot find module '#nativescript/core' or its corresponding type declarations".
For example, this will not work:
import { Label } from "#nativescript/core";
But with the tns-core-modules dependency it worked and was as simple as:
import { Label } from "tns-core-modules/ui/label"
After running the ns migrate command it remove tns-core-modules and updates #nativescript/core to 7.3.0
Am I importing incorrectly??
run npm install #nativescript/core
Then this should work
import { Label } from "#nativescript/core";
I use
import { ApplicationSettings, ImageSource } from '#nativescript/core';
in my recent project
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.
i am writing an an angular project with ag-grid and I want to try out the row grouping. Below is the test code from ag-grid website. However the grid shows regular grid and receive following in the debug window.
ag-Grid: enableRowGroup is only valid in ag-Grid-Enterprise, your column definition should not have enableRowGroup
Any idea, how to use trial version of ag-grid-enterprise?
Sample code: https://www.ag-grid.com/javascript-grid-grouping/
add below in app.modules.ts resolves the issue
import { AgGridModule } from '#ag-grid-community/angular';
To use ag-grid-enterprise features first of all you need to install the following npm package:
npm install --save ag-grid-enterprise
Then, add the import to app.module.ts:
import 'ag-grid-enterprise';
If everything is ok, you should see a message in the console that tells you there is no enterprise license key.
Currently working on a react app which uses the Facebook SDK. It seems to brake on the import of com.facebook.CallbackManager with the following error:
/android/app/src/main/java/com/phonebook/theredcorner/MainApplication.java:5: error: cannot find symbol import com.facebook.CallbackManager;
I've tried many suggestions online but it all doesn't seem to work. Anyone recently got this error and knows how to solve it?
I'm importing it in my MainApplication.java as follows
package com.phonebook.theredcorner;
import android.app.Application;
import com.facebook.CallbackManager;
import com.facebook.FacebookSdk;
import com.facebook.reactnative.androidsdk.FBSDKPackage;
import com.facebook.appevents.AppEventsLogger;
Furthermore I've followed all steps on the Facebook getting started page to implement the Facebook SDK.
The Facebook SDK was published as an independent module to Maven. Include the dependency in the app/build.gradle file.
dependencies {
// Facebook Core only (Analytics)
implementation 'com.facebook.android:facebook-core:5.0.0'
}
You may also need to add the following to your project/build.gradle file.
buildscript {
repositories {
mavenCentral()
}
}
If the error persists after installation, make sure the file is in the next path.
facebook-android-sdk/facebook-core/src/main/java/com/facebook/CallbackManager.java