question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Won't work when installed from npm.

See original GitHub issue

The 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:closed
  • Created 9 years ago
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
Sanniscommented, Nov 18, 2014

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.

5reactions
kilianccommented, Jun 2, 2015

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found