Comments (8)
@guptadeepanshu21 Try writing
console.log(require('html-entities/package.json').version);
to know what exact version you have installed right now.
from html-entities.
Are you able to import 'encode' directly from 'html-entities'.
I am getting following error :
export 'encode' (imported as 'encode') was not found in 'html-entities'
from html-entities.
Hello @meytin1337, encode
accepts one of 3 types: string | undefined | null
, not number
. Escaping numbers is not needed, none of numbers have any characters to escape.
from html-entities.
Hello @guptadeepanshu21.
What version are you using? Can you also paste your code?
from html-entities.
Hi @mdevils,
Using the latest version only.
Webpack-dev-server is using html-entities as a dependency.
in webpack-dev-server, there is a file called overlay.js in which following piece of code is written:
import { encode } from 'html-entities'
when we build our project we get an error "export 'encode' (imported as 'encode') was not found in 'html-entities'"
When I tried to import it like import { Html4Entities } from 'html-entities' and used Html4Entities.encode, the error didn't occur.
and also I tried to use html-entities in my local JS project.
In VS code, when we try importing encode, intellisense doesn't show it as a suggestion but it shows as 'Html4Entities' .
Can you try to do the same ?
from html-entities.
When I tried to import it like import { Html4Entities } from 'html-entities' and used Html4Entities.encode, the error didn't occur.
It means you have an older version of html-entities installed for some reason. Latest webpack-dev-server
uses the latest version of html-entities
: https://github.com/webpack/webpack-dev-server/blob/master/package.json#L53
from html-entities.
@mdevils Please check this. I installed the latest version just now.
from html-entities.
@mdevils you are correct, somehow webpack-dev-server is not getting the latest version. I will try to debug it.
Anyway, Thank you for helping.
from html-entities.
Related Issues (20)
- Incorrect Performance comparison HOT 2
- Audit vulnerabilities detected in the htmlentities project on Tag: v2.3.2 HOT 2
- Not decoding é HOT 3
- html-entities doesn't decode html breaks '<br />' HOT 4
- Unable to encode 𝌆 HOT 1
- How to migrate from v1.x to v2.x HOT 1
- assigning decode(someString) to something that expects a string causes es-lint typescript errors "Unsafe assignment of an any value." and "Unsafe call of an any typed value. HOT 1
- Latest release/tag `2.3.2` is out of sync with npm's listed `2.3.3` HOT 1
- Can't import the named export 'decode' from non EcmaScript module (only default export is available) HOT 2
- JSON.parse may be faster for namedReferences object HOT 4
- The "timesbar" entity is not decoded correctly HOT 1
- Option to prevent double encoding HOT 3
- Decoding entities from a state component - react native HOT 1
- named-references - not available in 2.3.3 npm install? HOT 9
- How to prevent encoding < and > like it was done in v1.4 ? HOT 7
- VirusTotal - 1 security vendor flagged this URL as malicious HOT 1
- Add map file? HOT 14
- Error using html-entities with rollup HOT 1
- safari 12 \ud835 error
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 html-entities.