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.

Building: loadReposFromCache(...).error is not a function

See original GitHub issue

I get the following error when running ./node_modules/gulp/bin/gulp.js setup-project:

[16:44:12] Requiring external module babel-register [16:44:12] Using gulpfile /tmp/syntaxhighlighter/gulpfile.babel.js [16:44:12] Starting ‘setup-project:clone-repos’… [16:44:12] ‘setup-project:clone-repos’ errored after 788 μs [16:44:12] TypeError: loadReposFromCache(…).error is not a function at loadRepos (/tmp/syntaxhighlighter/build/setup-project.js:39:48) at Gulp.<anonymous> (/tmp/syntaxhighlighter/build/setup-project.js:48:5) at module.exports (/tmp/syntaxhighlighter/node_modules/orchestrator/lib/runTask.js:34:7) at Gulp.Orchestrator._runTask (/tmp/syntaxhighlighter/node_modules/orchestrator/index.js:273:3) at Gulp.Orchestrator._runStep (/tmp/syntaxhighlighter/node_modules/orchestrator/index.js:214:10) at Gulp.Orchestrator.start (/tmp/syntaxhighlighter/node_modules/orchestrator/index.js:134:8) at /tmp/syntaxhighlighter/node_modules/gulp/bin/gulp.js:129:20 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (module.js:655:11) (node:18176) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open ‘/tmp/syntaxhighlighter/.projects-cache.json’ (node:18176) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I followed exactly the steps described at https://github.com/syntaxhighlighter/syntaxhighlighter/wiki/Building. Using npm 5.5.1-1 on ArchLinux. I also tried installing the git and github module manually, but nothing changed.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:7
  • Comments:16

github_iconTop GitHub Comments

20reactions
nstublencommented, Feb 28, 2018

Here’s what worked for me…

After installing npm dependencies, go into node_modules/songbird/lib/songbird.js and change

Promise = global.Promise || require("bluebird");

to

Promise = require("bluebird");

This will make sure the extensions for Promise are available.

5reactions
crazy-maxcommented, Mar 1, 2018

I’ve used @nstublen workaround to create a docker image to build syntaxhighlighter and also add custom brushes / themes if you want to take a look : https://github.com/crazy-max/docker-syntaxhighlighter

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building: loadReposFromCache(...).error is not a function ...
syntaxhighlighter - Building: loadReposFromCache(...).error is not a function ... I am trying to use the plugin SyntaxHighlighter v4, but I cannot get the...
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
User mhatch - Stack Overflow
syntaxhighlighter - Building: loadReposFromCache(...).error is not a function. Nov 22, 2017 ... React Mocha-chai test not recognizing store from prop.
Read more >
How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript error TypeError: "x" is not a function occurs when there is an attempt to call a function on a value or...
Read more >
Uncaught TypeError: childGe.isChecked is not a function
Hi All , After the San Diego upgrade , the magnifying glass searchers are not working only in the Incident form. Getting the...
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