Docusaurus: `npm install` throws error on `highlight.js`

Created on 26 Feb 2019  路  5Comments  路  Source: facebook/docusaurus

馃悰 Bug Report

npm install within a website directory throws an error around highlight.js. yarn install actually works.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

(Write your steps here:)

  1. cd website
  2. rm -rf node_modules
  3. npm install

Expected behavior

Everything is all good so I can run npm start.

Actual Behavior

[joelm@joelm-mbp:~/dev/redex-joel/website]  (master) $ npm install
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: The major version is no longer supported. Please update to 4.x or newer
npm WARN website No repository field.
npm WARN website No license field.

npm ERR! path /Users/joelm/dev/redex-joel/website/node_modules/highlight.js/tools/build.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/joelm/dev/redex-joel/website/node_modules/highlight.js/tools/build.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joelm/.npm/_logs/2019-02-25T23_21_29_309Z-debug.log

Reproducible Demo

Clone https://github.com/facebook/redex and try npm install in the website directory there. I was using node v8.11.1.

bug intermediate

Most helpful comment

This has been fixed in highlight.js.

cc: @int3

All 5 comments

@jpwain Thank you!

This has been fixed in highlight.js.

cc: @int3

Thanks for the tip @jpwain! @JoelMarcey I think the problem was that npm install is not pinned to a particular version and it used the latest version of highlight.js. This problem should be resolved because highlight.js has published a new version and npm install will pick up that newer one instead.

Yep - I tested again on Redex and it was fine.

Sent with GitHawk

Was this page helpful?
0 / 5 - 0 ratings

Related issues

endiliey picture endiliey  路  3Comments

rickyvetter picture rickyvetter  路  3Comments

lex111 picture lex111  路  3Comments

ericnakagawa picture ericnakagawa  路  3Comments

philipmjohnson picture philipmjohnson  路  3Comments