Building syntaxhightlighter with nodejs in windows 7 - node.js

I need to build Syntaxhighlighter from here: https://github.com/alexgorbatchev/SyntaxHighlighter
I have read these:
https://npmjs.org/doc/faq.html
Getting started with NODE.JS in windows x86
Get started with Node.js in Windows
Installing node packages / dependencies using npm on Windows Server 2008
It seems that installing Nodejs from here http://nodejs.org/download/ should be enough.
Step 3 in the syntaxhighlighter Building instructions says:
3.Then ./node_modules/.bin/bower install to download dependencies
I have this path on my machine:
C:\Program Files (x86)\nodejs\node_modules\npm\bin
and I can see a bower.json in the syntaxhighlighter zip file.
I have googled how to download dependencies for windows, but I cant find anything.
There is a lot of info here:
How do I get started with Node.js
but I think this is not for windows env.
Can you assist?
EDIT:
Ok, seems to work now.
Installed Git-1.8.4-preview20130916.exe and restarted.
Step 8 ok now.
Step 9 gives "grunt not recognized".
Tried
npm install -g grunt-cli
from here: https://github.com/gruntjs/grunt/issues/774
Now I have a pkg folder
Thank you sir

Install NodeJs for Windows per instructions
Install Git for Windows, select option to Add Git to your path.
Open a new command prompt in Windows. Ideally, open as an Administrator. Do not reuse existing command prompts. The path will only be set in a new command prompt properly.
Download the code for the highlighter or use git to clone
If you got the zip file, unzip it
From the command prompt, change the active directory to be the folder of the code you cloned or unzipped
Type npm install -g grunt-cli, then Enter after each of the following...
Type npm install -g bower
Type npm install
Type bower install
Type grunt build
Done.

You have to install git package in this way:
sudo apt-get install git
It's working fine!

Related

Npm not working (openSSL configuration error windows10x64)

I was getting this error whenever I try the npm command in powershell:
**~ $ node -v
v17.1.0
~ $ npm -v
OpenSSL configuration error:
74240000:error:80000003:system library:BIO_new_file:No such process:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:67:calling fopen(C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf, rb)
74240000:error:10000080:BIO routines:BIO_new_file:no such file:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:75:
74240000:error:07000072:configuration file routines:def_load:no such file:c:\ws\deps\openssl\openssl\crypto\conf\conf_def.c:179:
OpenSSL configuration error:
A8250000:error:80000003:system library:BIO_new_file:No such process:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:67:calling fopen(C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf, rb)
A8250000:error:10000080:BIO routines:BIO_new_file:no such file:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:75:
A8250000:error:07000072:configuration file routines:def_load:no such file:c:\ws\deps\openssl\openssl\crypto\conf\conf_def.c:179:**
Another thing I noticed is that the node must have updated incorrectly because even though it gives me a version, I cannot uninstall it and cannot find the install files in my program files. I am at a total loss and about to just reset my computer to default. I want to repair it but everything online tells me to use npm, which in itself is not possible.
I have tried using the "set OpenSSL" command to empty or to a dummy file but it does not seem to do anything.
Go to the Windows control panel and click on Uninstall a program, select Node.js and click on the uninstall tab to uninstall the node and npm successfully. Restart your system.
Then go to https://nodejs.org/en/ to download 16.13.0 LTS version and install it
Please check environment path using PowerShell
check environment path:
cmd /c echo %PATH%' or 'cmd /c echo %OPENSSL_CONF%
You will get C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf path so reset the environment path for openssl using below comment on PowerShell
set OPENSSL_CONF=''
after that, the problem will be fixed.
this issue already issued on Nodejs GitHub.
https://github.com/nodejs/node/issues/40547
the only thing that you're to do is to create a new archive called openssl.cnf
in this route:
C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf
Save the work and run in cmd: npm --version
Had this issue in a conda environment. Fixed by installing node with next command: conda install -c conda-forge nodejs=16.3.2
Try to uninstall the node from your project directory.
npm uninstall node
Most probably you have 2 different versions of Node installed on your system.
If my solution does not work for you. Try the other suggestions with uninstalling Node from the system.
My solution was to use another node version in this case 15.8.0, you can try with others most recently versions. When I did this npm was installed correctly:

Unable to install "testmybot" npm package

I am trying to use this sample to demonstrate the chatbot testing using node "testmybot" package. When I execute "npm install" command I am getting error. Please find the screenshot of the same attached below.
Steps that I have followed:
1. Downloaded the project from [https://github.com/codeforequity-at/testmybot-sample-calculator]
2. Extracted the project to "testmybot-sample-calculator-master" folder
3. Inside the folder executed "npm install" command
4. After installing some packages, looks like while installing botkit package it is throwing error
Please let me know if I have missed out any steps.
To run this sample, there is now a Dockerfile included in the Github repository. The following commands should retrieve the latest files from Github, build a docker container and running the sample test cases inside.
$ git pull
$ docker build -t testmybot-sample-calculator .
$ docker run testmybot-sample-calculator
Obviously, you have to install docker first.
UPDATE:
I was able to reproduce it on a Windows workstation, user had no admin rights. Found solution here: you have to install the windows-build-tools package first, with a user having admin rights:
npm install --global --production windows-build-tools
Afterwards, installation of the package in question was possible.

How to install nodejs and npm on windows using command lines

I am creating a package installer which has nodejs, redis, and socket.io as prerequisites. The problem is that I don't want the developers to install the prerequisites own their own.
I figured out a way of doing that using on mac and ubuntu by including brew install node for mac
and sudo apt-get install nodejs, sudo apt-get install npm
I am now looking for a way to install nodejs on window using a command or two.
Any Idea? Please.
You can install using this msiexec, select the version that's most suitable for you in the link
msiexec.exe /a https://nodejs.org/dist/v8.3.0/node-v8.3.0-x64.msi /quiet
Nodejs Alternative For Windows
Using Chocolatey:
cinst nodejs
or for full install with npm
cinst nodejs.install
Using Scoop:
scoop install nodejs
You could use:
cinst nodejs.install
This is great install with npm.
Install nodejs version 8.10.0 on window
download the installer from the url given below
https://nodejs.org/download/release/v8.10.0/
download .mis file from this page
you can download all versions form this url just by changing version number in the end of url
2.Install Angular 6 on window
Open command line as administrator
run below command in command line
npm install -g #angular/cli#6
I was running in the ServerCore windows container on Gitlab so the msiexec.exe did not work for me. However found another answer that did work over here from user Witcher: Docker + Node.js + Windows
The commands in the container that ended up working in my gitlab yml file before_script were:
Invoke-WebRequest 'https://nodejs.org/dist/v18.12.0/node-v18.12.0-win-x64.zip' OutFile 'C:/nodejs.zip'
Expand-Archive C:\nodejs.zip -DestinationPath C:\
Rename-Item "C:\\node-v18.12.0-win-x64" C:\nodejs
$Env:Path += ";C:\nodejs"
This is downloading the Zip file from Nodejs's site to the root of C, expanding the archive, and setting the nodejs path to the environment path variable so the "npm" command is recognized.

Update Parse Server on Ubuntu

I have my own Parse server running on an Ubuntu droplet on Digital Ocean. I'm pretty new to running my own backend. How do I check what version of Parse Server I'm running and how do I update it to the latest version?
Open terminal (command line tool), then use "cd" command to navigate to your parse-server-example directory: cd ...../parse-server-example/
Pull latest source code from github with command: git pull
Install packages and dependencies: npm install
Run it: npm run index.js
If you want your server keep running you can install and use forever.
Good luck!
You can look into the package.json file of parse-server .
Or you can just use npm list to list all packages and their dependencies with version .

"bower install underscore" getting error in node.js

"bower install underscore" getting error
bower ENOGIT git is not installed or not in the path
I want to use static resources in node.js website so I am installing underscore using bower but I am getting this error.
I am also getting the same error and the Solution is first check if the "Git" is installed or not in the system and if not please install it.
After installation open "Git Bash" from windows and go to your project (same way you go in command prompt using "cd path").
Then run the same "Bower install command", It will work as expected.
You should install Git and make sure the git command is globally accessible or at least accessible for bower.
The msysGit project has a handy installer to make things easier. (assuming you're running Windows)
http://msysgit.github.com/
Found this solution here: http://git-scm.com/book/en/Getting-Started-Installing-Git

Resources