Open appetere opened 8 years ago
@appetere
gulp setup-project
How does it work when running on git bash(ex. comes with the SourceTree)
?
@yumetodo Using git bash (still on Windows 10) from a fresh clone of the repo, I get the following:
npm install
Same warnings.
gulp setup-project
Runs without reporting any errors.
gulp build
Errors as:
gulp build
same issue on Windows7x64.
>gulp build --brushes=all --theme=midnight
[03:15:46] Requiring external module babel-register
[03:15:49] Using gulpfile ~\Documents\syntaxhighlighter\gulpfile.babel.js
[03:15:49] Starting 'build'...
[03:15:50] Error: File to import not found or unreadable: theme-base.scss
Parent style sheet: stdin
at options.error (C:\Users\yumetodo\Documents\syntaxhighlighter\node_modules\node-sass\lib\index.js:277:32)
./node_modules./node-sass./lib./index.js
// options.error and options.success are for libsass binding
options.error = function(err) {
var payload = util._extend(new Error(), JSON.parse(err));//this line.
if (cb) {
options.context.callback.call(options.context, payload, null);
}
};
hm... can you tell me if ./repos
folder get populated after gulp setup-project
and if it has theme-base/theme-base.scss
file?
Yes to both questions for me on Windows 10, after running gulp setup-project
from git bash.
./repos
has 49 directories.
thanks for checking! what about ./node_modules/theme-base/theme-base.scss
?
Ah-ha - that's not there. No ./node_modules/theme-base
directory at all.
I have 555 items in the ./node_modules
directory.
hm... during gulp setup-project
a bunch of symlinks are placed into the node_modules
folder... I'm really not sure what happens on windows. You could try npm install theme-base
... there might be a few other things that will be missing, in that case can also npm install
them. I'm not really sure what the right approach for windows build would be.
What do you think?
I had to give up trying to make it build on Windows, as don't have enough knowledge.
I have tried spinning up an Ubuntu instance on Amazon EC2, but again it won't build out of the box.
sudo gulp setup-project
fails initially with /usr/bin/env: node: No such file or directory
. This I managed to get round by using sudo update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100
Running setup-project
again then gives:
I am a newcomer to Unix, so realise I might be doing something wrong. But is there a particular flavour of Unix that the build-scripts should work on out of the box?
Using Amazon EC2 I have a choice (in the free tier) of
Any suggestions on which to use, or where else to build this? I don't have access to an Apple Mac unfortunately.
I think this projecct shoud publish pre-build files because this project is passing travis-cl. To fundamentally solve the issue like "I fail to build this. How to do?", it is only way, I think.
@alexgorbatchev Just to let you know I've just spent a couple of hours switching my software development blog to use Prettify from Google instead of SyntaxHighlighter.
The way you install this is very similar to SyntaxHighlighter v3, so very easy to do. I would have liked to have tried out your v4, which I'm guessing is just as good as Prettify, but I just couldn't work out how to build the project, to get the JavaScript and CSS I would need.
I have a couple of questions related to the problem of building on windows and how this is currently setup in syntaxhighlighter:
I know this is old, but the bug is still there. Here is the solution:
The problem is with making symbolic links under Windows. After trying to run 'setup-project' you can see the script trying to create dozens of symbolic links before giving an error message. There are three problems:
Temporary Solution: Open command prompt as Administrator. Create all links by hand, one by one. Every one that you need is listed during 'setup-project'. Then you can run 'build'
Another solution which worked well for me on Windows 10 is having the Windows Subsystem for Linux installed.
following up on Loud2004, here's a simple CMD script to make the links for you. Copy to a mklinks.cmd file in your top-level syntaxhighlighter folder and run from there.
@echo off for /D %%G in (repos\*) do call :linkdir %%~nG @echo on exit /b
:linkdir rmdir /s /Q node_modules\%1 mklink /D %CD%\node_modules\%1 %CD%\repos\%1 rmdir /s /Q repos\%1\node_modules mklink /D %CD%\repos\%1\node_modules %CD%\node_modules exit /b
you have to run ./node_modules/gulp/bin/gulp.js setup-project
to setup all the files in "./repos" folder before building
Hi guys, to solve this issue I've created a docker image to build syntaxhighlighter easily. You can also add custom brushes / themes : https://github.com/crazy-max/docker-syntaxhighlighter
hello
I'm trying to follow the building instructions using Windows 10. But I get warnings / failures at various points.
Below is the out-of-the-box experience, with the problems shown.
The first issue seems to be the use of
ln
to create links, which Windows doesn't understand. I did try running the script in Powershell (hoping it had a mapped command forln
) but this didn't work. Also tried editing the point whereln
is called to usemklink
instead, but this didn't seem to solve the problem either.So my question is whether there is a way to build this on Windows 10? I am new to npm and gulp, so am wondering if I have missed something obvious?
Steps I followed:
Using Command prompt, as administrator.
npm install
Issues warnings at start: And warnings at end:gulp setup-project
Fails whenln
is called: