Sublime Forum

I cannot install Typescript into my Sublime 3 Editor

#1

Hello,

I am struggling to install Typescript plugin into my Sublime text 3. I need it for Angular modules.

I am new to software development.

I have the site to install npm and node.
Then I have visited here to install Package Control
Then I have visited here to install Type script
I keep on getting syntax errors:

cd ~/"Library/Application Support/Sublime Text 3/Packages” git clone –depth 1 https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript
  File "<string>", line 1
cd ~/"Library/Application Support/Sublime Text 3/Packages” git clone –depth 1 https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript
   ^
SyntaxError: invalid syntax

When I try to install the plugin via the console at the top, I get a notification in the open doc saying “please open or create an Angular project”

What am I doing wrong?

0 Likes

#2

Did some tinkering…
Ensured I downloaded the Angular CLI globally…
Installed TypeScript Globally…
Ensured Package Control was installed…
Typed this first!
cd ~/"Library/Application Support/Sublime Text 3/Packages”
then hit enter, THEN TYPED THIS
git clone –depth 1 https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript File "<string>", line 1
Then hit enter. Installed fine and now I can see typescript in my lower right menu selector when I pull up a file in my sublime app.

FEEL SOOO STUPID FOR MISSING THIS

0 Likes

#3

From the looks of your error message, I would say that you have mistaken the Sublime console for a terminal window.

The panel that opens when you choose View > Show Console from the menu is a Python console for directly interacting with the Python interpreter that Sublime uses to power its plugin API. As such you can’t just insert general console commands in there, as all of the input is treated as Python source code.

That said, if you have Package Control successfully installed, instead of trying to manually install the TypeScript package you should just select Package Control: Install Package from the command palette and then select the TypeScript package to have PC install it for you automatically.

Generally speaking installing packages manually isn’t something that you should do unless the package in question absolutely requires it, since PackageControl will make sure that your packages are kept up to date, which you would have to do yourself if you did it manually.

1 Like

#4

Do you know how to pull up my Angular project (using Terminal or Sublime Text editor) after my angular app has been created (via the terminal)?

0 Likes

#5

Unfortunately although I use TypeScript in general, I don’t use it in relation to any frameworks and I’ve never used Angular in particular.

As such, except for just opening the appropriate folder in Sublime, I can’t help with that aspect.

0 Likes

#6

thanks for being clear. I will ask in a more generalize forum. THANKS!

0 Likes