Building: loadReposFromCache(...).error is not a function
See original GitHub issueI 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:
- Created 6 years ago
- Reactions:7
- Comments:16
Top GitHub Comments
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.
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