Comments (9)
Could I see a snippet of how you’re trying to use it?
What version of React are you using? I’ll try to reproduce.
from emoji-mart.
I am getting the same error with React 15.3.0.
from emoji-mart.
Any chance I can see how you’re importing/using the library? Thanks!
from emoji-mart.
Basically I am just trying that in the empty component, so nothing fancy
import React, {Component, PropTypes} from 'react';
import {emojify} from 'react-emojione';
import {Picker} from 'emoji-mart'
export default class MessageEditor extends Component {
render() {
return (
<div>
<Picker sheetURL='https://npmcdn.com/[email protected]/sheets/sheet_apple_64.png'/>
</div>
)
}
}
I can try that in some clean project to rule out it's not for example issue with the node modules in my current project
from emoji-mart.
It does look good.
There’s a chance that it’s because you have multiple versions of React installed locally.
Try npm ls | grep react
, if you see more than one version that’s probably the issue.
You could either rm -rf node_modules
and npm install
or try only removing the extra React you don’t need.
from emoji-mart.
I had this same issue. I didn't have 2 reacts installed, however, It turned out that the culprit was that I had configured ProvidePlugin on webpack, like so:
plugins: [
new webpack.ProvidePlugin({
React: 'react'
})
]
so it would see both React
and react
. The fix was loading Picker
directly from src and make a special case in webpack's config to use emoji-mart
's source.
import Picker from 'emoji-mart/src/components/picker';
on webpack.config:
loaders: [...,
{
test: /\.js$/,
include: [
path.join(__dirname, 'src'),
path.join(__dirname, 'node_modules', 'emoji-mart')
],
loader: 'babel-loader'
},
]
from emoji-mart.
I am facing the same problem. Any update for this ?. I really liked this library and wanted to use it in my project.
I don't have duplicate react js version still I have tried rm -rf node_moduels and reinstalling it still no luck.
Just adding simple one line in my project
And it is showing the above error.
from emoji-mart.
Do you also use webpack.ProvidePlugin
?
I’ll try to reproduce.
from emoji-mart.
Thanks for fixing it now it's working superb.
No I was not using the ProvidePlugin.
from emoji-mart.
Related Issues (20)
- getEmojiDataFromNative does not seem to work with country flags generated by emoji-mart
- Help: Custom PNG emojis not rendering correctly inside of the textbox/textarea. HOT 4
- Set Frequently used emojis HOT 3
- Runtime error says `D.latestVersion is not a function` in production build by Next.js 13 App Router. HOT 21
- Update for Emoji-Version 15.0 HOT 1
- Emoji `Face in Clouds` HOT 1
- Failed to modify its style
- Not able to click when the emoji component is inside a drawer component
- hard coded svgs license?
- Feature request - Add Custom Emoji button
- Changing styles for different div of picker?
- Question: How to put apple smile in my input? (React) HOT 1
- Emoji listing does not load emojis when the em-emoji-picker element is moved
- Error
- Hiding search input HOT 3
- Emoji mart tries to download the emojis from the internet
- Adding HTML node in insertContent
- Serious Memory Leak when show/disappear <Picker> Component
- There are style issues in lower versions of Google Chrome(version69)
- When you slide the scroll bar very fast, the icon below cannot be rendered. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emoji-mart.