Snippets

litmis Installing Typescript on IBM i

Created by Aaron Bartell

File content.md Added

  • Ignore whitespace
  • Hide word diff
+  |   |   | 
+- | - | - | -
+[![IBM i Hosting](http://krengel.tech/img_litmis_hosting)](http://krengel.tech/space0cf4) | [![Cybersource Toolkit for i](http://krengel.tech/img_cti)](http://krengel.tech/cyberb788) | [![RPG-XML Suite](http://krengel.tech/img_rxs)](http://krengel.tech/rpgxm7551)
+[]() | [![Payment Terminal Toolkit for i](http://krengel.tech/img_ptti)](http://krengel.tech/payme5f56) | [![UPS Toolkit for i](http://krengel.tech/img_upsti)](http://krengel.tech/upsto60db)
+
+# Installing Typescript on IBM i
+
+Installing [TypeScript](http://www.typescriptlang.org/) on IBM i is about as easy as it gets.  Who knew we'd be running a [Microsoft language](https://github.com/Microsoft/TypeScript) on IBM i.
+
+First, make sure you have Node.js installed on your IBM i to give you access to the `npm` command.  Then run the following command from a shell session (preferably an SSH session from a client like putty).
+
+```
+$ npm install -g typescript@next                   
+/QOpenSys/QIBM/ProdData/OPS/Node6/bin/tsserver -> /QOpenSys/QIBM/ProdData/OPS/Node6/lib/node_modules/typescript/bin/tsserver /QOpenSys/QIBM/ProdData/OPS/Node6/bin/tsc -> /QOpenSys/QIBM/ProdData/OPS/Node6/lib/node_modules/typescript/bin/tsc
+/QOpenSys/QIBM/ProdData/OPS/Node6/lib                                           
+`-- typescript@2.7.0-dev.20171115                                               
+```
+Now check to see if it exists.
+```
+$ which tsc                                        
+tsc not found                                                                   
+```
+Couldn't find it.  Try adding a symbolic link so it's in the current search path.
+```
+$ ln -s /QOpenSys/QIBM/ProdData/OPS/Node6/bin/tsc /QOpenSys/usr/bin/tsc
+```
+Now try the command again, this time displaying the version.
+```
+$ tsc --version
+Version 2.7.0-dev.20171115
+```
+
+Score!
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.