Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8745477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:01:12+00:00 2026-06-13T12:01:12+00:00

It seems everyone’s got the sample to work, but mine just won’t… I have

  • 0

It seems everyone’s got the sample to work, but mine just won’t…

I have nodejs 0.8.2 install in windows 7 64bit. Did a npm install -g typescript to get TypeScript support. Then I downloaded the source from TypeScript and tried the samples
but I just can’t get the node sample to compile. It returns the error message:

c:\..\..\typescript\bin\tsc.js:21182
           if(_fs.existsSync(path)) {
                  ^
TypeError: Object #(Object) has no method 'existsSync'
...
...

Has anyone else seen this problem?

Been looking around for hours without finding anything.

Say that I have this code:

///<reference path="node.d.ts"/>


import http = module("http");

var server = http.createServer(function (req, res)
{
    res.writeHead(200, { 'ContenType': 'text/plain' });
    res.end('Hello World');
});

server.listen(1337);

Typed this up in Visual 2012 express for web, which showed no error. The reference is in place, and intellisense is working fine. But when I use the command-line tool with node to compile this file, it pops the error shown further up.. I did not include _fs.existsSync in my own code.

Ok… after playing around with tsc.js and nodejs… I realized that the _fs object created from require(‘fs’) in node engine doesn’t have a function called existsSync at all…

After searching a bit more… apparently this function is now under the path module…
I’ll try editing tsc.js to use the path module’s existsSync function instead.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:01:13+00:00Added an answer on June 13, 2026 at 12:01 pm

    Ok… change the tsc.js to use _path.existsSync instead seem to work.
    But after some more fiddling around, I found the the node version on my system is still v0.6.2.
    Even though I tried to install v0.8.12 downloaded from the site before.
    After removing v0.6.2 and installed v0.8.14, now the fs module contains the target function.

    I wonder why the node version on this system was stuck on 0.6.2 ~”~

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably a newbie question, but everyone seems to use e.printStackTrace() , but I have
In my site I have a Staff lounge, But it seems that everyone can
Seems everyone recommends virtualenv for multiple python versions (on osx), but does it even
It seems everyone knows about the dumb little but in PhoneGap that doesn't allow
everyone seems interested in building IPhone apps today. Do you have to have an
Seems to be a problem that many people have, but all the answers I
Seems like everyone always ignores the time part, but how would you compare two
This question has been asked many times before but it seems everyone else is
I have searched all over the place to no avail. Everyone seems to have
Seems like everyone have issue accessing local machine or internet etc from emulator. All

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.