Won't work when installed from npm.
See original GitHub issueThe client side version seems to not be included inside the npm package of the library.
When trying to load node_modules/highlight.js/lib/highlight.js
an error is thrown :
Uncaught ReferenceError: module is not defined
.
I guess the client side version of the library should be packaged with it so that the module can be installed from npm.
Issue Analytics
- State:
- Created 9 years ago
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Npm install doesn't work (no errors), but npm install <package ...
Option B: Install the packages and use --save to add the packages to the package.json file. Run npm install to install the dependencies....
Read more >How to fix npm install command not working
The error above happens when npm can't be found under the PATH environment variable. First, you need to make sure that npm is...
Read more >Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >npm command not found | Career Karma
The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be...
Read more >Why does NPM install not work? - Quora
The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
npm is desined for server-side usage. You can use npm version with broserify or use third-party bower/composer/components package of highlight.js, e.g. https://github.com/components/highlightjs.
@isagalaev I guess you just decide, we just need npm to work and to be able to select the languages we want. It’s obviously impossible to publish on npm all combinations of languages.
People want files to work on GitHub master? Thats ok, but what files?
My suggestion is that github must be the place for source files not builds. You can have a pipeline to upload builds to the builds sections if needed.
On npm we should be able to find alla languages and core available as single require or
src
for the browser. Concat + minify has to be developer responsibility or CDN responsibility.The final cherry is to make custom build installable using npm.