New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building: loadReposFromCache(...).error is not a function #428
Comments
Seconded. Using npm 5.4.2 on arch linux |
Download Theme for (--theme=default) (https://github.com/syntaxhighlighter) |
I get this error also. Using Windows 7, npm 3.10.10
|
On linux
|
Running into the same issue. It's compounded by the fact that the NPM package seems to have exporting errors when used within Webpack. Anyone find a work around? |
I have posted a stackoverflow question concerning this issue here: https://stackoverflow.com/q/47438759/4084574 |
I meet same issue when i try to build on Windows 10 or CentOS 7.
On Windows 10 by Git Shell:
Also,i see the people meet same issues on StackOverFlow. |
I fixed this issue by changing .error in the following line to .catch const loadRepos = () => loadReposFromCache().error(loadReposFromGitHub).then(R.map(R.pick(['ssh_url', 'name']))); Line 39 of setup-projects.js However there were other things that I had to do to get a full build working. |
I met this issue too, does any fix that? |
@qfocus your file is |
Why depends package
|
This looks to be part of a batch of issues with Promises in the setup-project and bundle scripts. I've got this to build and committed to a fork here: For this specific issue, you could remove/skip the loadReposFromCache, and always load from GitHub Repo:
This will still crap out, but you should have enough to move onto the build at that stage |
Here's what worked for me... After installing npm dependencies, go into node_modules/songbird/lib/songbird.js and change
to
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 |
Hey folks, came up with a quick workaround since I'm just trying to get a basic build working and I know more about Python than I do about Node. This probably only works on any Linux, regardless of Python version, but I have only tested my personal Ubuntu. You can probably change the calls to Dump the following code into a import urllib
import json
import os
import subprocess
project_dir = os.path.dirname(os.path.realpath(__file__))
api_url = 'https://api.github.com/orgs/syntaxhighlighter/repos?per_page=300'
repos = json.load(urllib.urlopen(api_url))
for repo in repos:
if repo['name'] != 'syntaxhighlighter':
# Clones the repo into the repos directory
subprocess.call([
'git', 'clone', repo['clone_url'],
os.path.join('repos', repo['name'])
])
# Links the project's node_modules into each repo
src1 = os.path.join(project_dir, 'node_modules')
dest1 = os.path.join(project_dir, 'repos', repo['name'], 'node_modules')
if not os.path.exists(dest1):
os.symlink(src1, dest1)
# Links each repo into the project's node_modules
src2 = os.path.join(project_dir, 'repos', repo['name'])
dest2 = os.path.join(project_dir, 'node_modules', repo['name'])
if not os.path.exists(dest2):
os.symlink(src2, dest2) After applying @nstublen 's fix to songbird.js, I was able to run a successful build. |
Thanks @AustinTSchaffer . That Indeed worked. |
I get the following error when running
./node_modules/gulp/bin/gulp.js setup-project
: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.
The text was updated successfully, but these errors were encountered: