Git Product home page Git Product logo

typescript-compiler's Introduction

TypeScript compiler for Meteor Build Status

Exports two symbols:

  • TypeScriptCompiler - a compiler to be registered using registerBuildPlugin to compile TypeScript files.

  • TypeScript - an object with compile method. Use TypeScript.compile(source, options) to compile with preset options.

typescript-compiler's People

Contributors

barbatus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

typescript-compiler's Issues

tsconfig "exclude"?

can you please add support to the exclude propery on the tsconfig.json file?

Problem with embedded typescript

I'm using angular2, typescript and therefore include this package.
I hit an issue where the DOM definitions in typescript appear to have changed, in a breaking way. So typescript now (I'm currently using 2.3.2) uses SVGGraphicsElement as a base class for say getBBox(). But the older 2.0.0 version used SVGLocatable.
The problem is that other tools including Webstorm are expecting SVGGraphicsElement and I get errors.

In this specific case, I can easily work-around this inconsistency and use an 'any' type, but the more general issue is that typescript is advancing at quite a rate, and being tied to the version included in this package is going to become a significant issue.

I discovered it by trying to find where SVGLocatable is declared, and the result was:
./.meteor/local/build/programs/server/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/lib.d.ts plus the dom.d.ts etc.

So the question is how can I avoid using these definitions, and rely in the typescript version I have in node_modules/typescript?

I have a single tsconfig.json config file at the top:

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "removeComments": false,
    "noImplicitAny": false,
    "sourceMap": true
  },
  "exclude": [
    ".meteor"
  ]
}

I'm not sure the 'exclude' is really doing anything.
I also added a libs entry to try to explicitly specify libraries ("lib": [ "es2015", "dom" ],) but that didn't make any difference.

I also tried using "typeRoots" : ["./node_modules/@types"] to prevent searching for type definitions, but no difference there either.

Any ideas?

No compiler with cache support?

Hi @barbatus ,

I am trying some stuff with the compiler, and notice that every file change causes all files to compile again. I think that with an implementation of CachingCompiler will be much better and work much faster.

What do you think?

@Urigo

Support for async / await

Firstly, I really appreciate for your project!

I love TypeScript & Meteor both :-)

So, the issue goes like this.

Meteor 1.3 supports async / await.

In order to use async / await in TypeScript, we should set compilerOptions.target to "es6" in tsconfig.ts

However, this compiles files into ES6, which is not suitable for Meteor's Node.js version 0.10.x

So, it throws an error.

Do you have any plans to deal with this?

Or, Meteor version 1.4 is gonna be released soon, and its Node version is 4.x.

So maybe it's better just wait for it?

What's your plan?

Support for importing from project root

import Page from '/imports/page';

Works in a .js file, but not in a .ts file. Using '../../../..' all the time gets frustrating quickly.

I tried to find a tsconfig.json setting for this, but it doesn't seem to exist. What is the best way around this? Would be great if this could be supported.

node_modules are being compiled in Meteor 1.3.2 rc

Hi @barbatus

Tried to run an app with the compiler, Meteor version is 1.3.2-rc.5.
All the .ts files that under node_modules are sent to the compiler.

Tried to add "exclude", "files", "filesGlob" to tsconfig.json but nothing did the trick... I think that the compiler should handle it by himself in the processFilesForTarget function.

Any idea?

Thanks.

@Urigo

Barrels do not work any more

After updating angular2-compilers from 0.5.7 to 0.6.0
The Barrels do not work any more.

Say I have a folder.

foo
-- aa.component.ts
-- bb.component.ts
-- index.ts

index.ts

export * from './aa.component';
export * from './bb.component';

Using Barrels, I can do import { AaComponent, BbComponent } from './foo';, however now it does not work any more.


Now I have to import like this:

import { AaComponent } from './foo/aa.component';
import { BbComponent } from './foo/bb.component';

How to guide?

Hi! Thank you so much for building this.

Is there some sort of readme or how to guide setting this up? Particularly with Meteor 1.3? Thank you for any assistance.

Typo in repository name

The repository name was probably intended to be typescript-compiler, not typesctipt-compiler.

Performance issue with typescript compiler

I was giving the meteor 1.4.2.rc.0 build a spin in the hope that startup times would be substantially better... sadly, not as much as I would like. So I did a profiling run on the initial launch of meteor (on OSX 10.11.6 MacBook Pro 2015, 2.7 GHz Intel Core i5), Meteor 1.4.2.rc.0.

I used METEOR_PROFILE=100 TYPESCRIPT_LOG=4 meteor on an app that had had no changes since the last run (a few minutes earlier).

The interesting thing is that the meteor profiling says:
prepareProjectForBuild takes 2.2s
Build App 94.4s of which compiler.compile takes 71s, but of that,

  • JsImage#load runJavaScript packages/barbatus_typescript-compiler.js is 62.5s
    Clearly, the bulk of the time is in the compiler, given there is other bundling to do etc.

The mystery for me is that there's no obvious explanation in the typescript profiling, it says:

compiler options: {"experimentalDecorators":true,"module":"commonjs","target":"es5","isolatedModules":false,"moduleResolution":"node","emitDecoratorMetadata":true,"removeComments":false,"noImplicitAny":false,"sourceMap":true,"noEmitHelpers":true,"jsx":"react","noResolve":false,"lib":["es5","dom"],"diagnostics":true,"noImplicitUseStrict":true}

exclude started web.browser (335 files)
tsBuild time: 223ms
tsEmitFiles time: 818ms
compilation time: 1044ms

exclude started os.osx.x86_64 (173 files)
tsBuild time: 71ms
tsEmitFiles time: 163ms
compilation time: 234ms

All of the other messages seem to suggest that compilation output is coming from the cache, and times are one or two milliseconds with a few spurious 9-10 ms. But nothing large.

So is there a way to narrow down why Meteor thinks the typescript compiler is taking so long, and if everything is coming from the cache - what is taking a minute?

I'm not criticising the compiler or anything like that, I'm just trying to establish if there is anything I can do to improve our build times.

Note that I checked the file lists, and there doesn't seem to be anything particularly out of the ordinary or duplicates in the the list (e.g. I'm definitely not pulling in node_modules).

Support for importing from packages with index.ts

The recent bump in meteortypescript:compiler released changes that seem to break imports using an index.ts file. For instance:

// server/main.ts
import * as x from "../imports/api";
console.log(x);
// imports/api/index.ts
export const x = 3;

Gives the following error:

/Users/abesto/.meteor/packages/meteor-tool/.1.3.2_4.6879pv++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:267
                        throw(ex);
                              ^
Error: Cannot find module '../imports/api'
    at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:78:1)
    at meteorInstall.server.main.ts (server/main.ts:1:14)
    at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
    at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
    at server/main.ts:2:16
    at /Users/abesto/playground/meteor-typescript-repro/.meteor/local/build/programs/server/boot.js:283:10
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/abesto/.meteor/packages/meteor-tool/.1.3.2_4.6879pv++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
    at /Users/abesto/playground/meteor-typescript-repro/.meteor/local/build/programs/server/boot.js:133:5

But this works:

// server/main.ts
import * as x from "../imports/api/index.ts";
console.log(x);

Why are diagnostics disabled for packages?

These two lines disable error output for packages. Is there a specific reason for this? It was quite confusing to me because I was trying to organize my project into a few local packages and the lack of error output led me to believe that my files were not being compiled! I think this is also causing confusion here https://github.com/meteor-typescript/meteor-typescript-compiler/issues/22

https://github.com/barbatus/ts-compilers/blame/master/compilers/basic_compiler.js#L106-L107

Debug Failure

I just upgraded my Meteor Typescript integration stack:

Changes to your project's package version selections:
                                              
barbatus:typescript           upgraded from 0.6.6 to 0.6.7
barbatus:typescript-compiler  upgraded from 0.9.6_1 to 0.9.7
modules                       upgraded from 0.9.1 to 0.9.2
./node_modules/.bin/tsc --version
Version 2.4.1

Now trying to compile our project results in this:

=> Errors prevented startup:                  
   
   While processing files with barbatus:typescript (for target web.browser):

   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:34612:26:
   Debug Failure. 
   at reportError
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:34612:26)
   at hasExcessProperties
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:34804:37)
   at isRelatedTo
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:34686:25)
   at checkTypeRelatedTo
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:34600:26)
   at checkTypeAssignableTo
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:34300:20)
   at checkVariableLikeDeclaration
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:44867:21)
   at checkVariableDeclaration
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:44918:20)
   at checkSourceElement
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46754:28)
   at Object.forEach
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:1506:30)
   at checkVariableStatement
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:44927:16)
   at checkSourceElement
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46723:28)
   at Object.forEach
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:1506:30)
   at checkBlock
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:44546:16)
   at checkSourceElement
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46721:28)
   at checkFunctionOrMethodDeclaration
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:44364:13)
   at checkMethodDeclaration
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:43374:13)
   at checkSourceElement
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46689:28)
   at Object.forEach
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:1506:30)
   at checkClassDeclaration
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:45747:16)
   at checkSourceElement
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46758:28)
   at Object.forEach
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:1506:30)
   at checkSourceFileWorker
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46841:20)
   at checkSourceFile
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46821:13)
   at getDiagnosticsWorker
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46885:17)
   at getDiagnostics
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:46871:24)
   at Object.getEmitResolver
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:27058:13)
   at emitWorker
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:69671:69)
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:69636:66
   at runWithCancellationToken
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:69728:24)
   at Object.emit
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:69636:20)
   at Object.getEmitOutput
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/typescript/lib/typescript.js:89316:38)
   at CompileService.CP.compile
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/meteor-typescript/compile-service.js:27:29)
   at compile
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/meteor-typescript/index.js:156:35)
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/meteor-typescript/index.js:171:16
   at Cache.CCp.get
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/meteor-typescript/cache.js:167:19)
   at TSBuild.emit
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/meteor-typescript/index.js:168:31)
   at packages/barbatus:typescript-compiler/typescript-compiler.js:135:30
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:182:20
   at replenish
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:317:21)
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:324:29
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:44:16
   at packages/barbatus:typescript-compiler/typescript-compiler.js:142:7
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:182:20
   at replenish
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:317:21)
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:324:29
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:44:16
   at packages/barbatus:typescript-compiler/typescript-compiler.js:142:7
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:182:20
   at replenish
   (/home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:317:21)
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:324:29
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:44:16
   at packages/barbatus:typescript-compiler/typescript-compiler.js:142:7
   at
   /home/user/.meteor/packages/barbatus_typescript/.0.6.7.kylygs++os+web.browser+web.cordova/plugin.typescript.os/npm/node_modules/meteor/barbatus_typescript-compiler/node_modules/async/lib/async.js:182:20
   at replenish

...etc.

This problem didn't happen with the previous version.

Error wrongly cached during compilation

Hi,

first of all thank you for the whole suite of meteor-typescript packages, they are incredibly useful.

I have been using them for a while and, except for the bad state of typings of Meteor and atmosphere packages, they have been working very nice.

I have only one issue that I experience rarely:
1)I have one (or more) errors in my typescript compilation and I can see them in visual code and in the terminal
2)I fix them (and visual code is happy again)
3)I still see them in the terminal, even when I am 100% I fixed them. (I have one currently that complains about the name of a variable that I just created, I replaced the name with the correct one and the error still shows me the old name)
4)They stay in the terminal for quite some time, they survive following compilations, a restart from meteor, a deletion of .meteor/local/builder-cache.
5) Eventually they go away, but I didn't identify yet what causes that

I am not sure where this could be cached, whether it's in meteor, in typescript, babel or else.
But I would definitely appreciate some way to clean it up.

Error in typescript compiler

I am getting error like below in meteor 1.3.2, my project is a angularjs 2 project.
Could you please help me solve this, the development is stopped due to this error.

`=> Errors prevented startup:

While processing files with barbatus:typescript (for target
web.browser):

C:\Users\sathishkumar_v\AppData\Local.meteor\packages\meteor-tool\1.3.1\mt-o
s.windows.x86_32\tools\static-assets\server\mini-files.js:67:23:
Cannot call method 'replace' of undefined
at Object.convertToStandardLineEndings
(C:\Users\sathishkumar_v\AppData\Local.meteor\packages\meteor-tool\1.3.1\mt-
os.windows.x86_32\tools\static-assets\server\mini-files.js:67:23)
at ResourceSlot.addJavaScript
(C:\tools\isobuild\compiler-plugin.js:515:13)
at InputFile.addJavaScript
(C:\tools\isobuild\compiler-plugin.js:314:24)
at packages/barbatus:typescript-compiler/typescript-compiler.js:95:19
at Array.forEach (native)
at packages/barbatus:typescript-compiler/typescript-compiler.js:65:17
at
C:\Users\sathishkumar_v\AppData\Local.meteor\packages\barbatus_typescript\0.
2.8\plugin.typescript.os\npm\node_modules\meteor\barbatus_typescript-compiler\no
de_modules\async\lib\async.js:182:20
at
C:\Users\sathishkumar_v\AppData\Local.meteor\packages\barbatus_typescript\0.
2.8\plugin.typescript.os\npm\node_modules\meteor\barbatus_typescript-compiler\no
de_modules\async\lib\async.js:234:13
at _arrayEach
(C:\Users\sathishkumar_v\AppData\Local.meteor\packages\barbatus_typescript\0
.2.8\plugin.typescript.os\npm\node_modules\meteor\barbatus_typescript-compiler\n
ode_modules\async\lib\async.js:85:13)
at _each
(C:\Users\sathishkumar_v\AppData\Local.meteor\packages\barbatus_typescript\0
.2.8\plugin.typescript.os\npm\node_modules\meteor\barbatus_typescript-compiler\n
ode_modules\async\lib\async.js:76:13)
at Object.async.forEachOf.async.eachOf
(C:\Users\sathishkumar_v\AppData\Local.meteor\packages\barbatus_typescript\0
.2.8\plugin.typescript.os\npm\node_modules\meteor\barbatus_typescript-compiler\n
ode_modules\async\lib\async.js:233:9)
at Object.async.forEach.async.each
(C:\Users\sathishkumar_v\AppData\Local.meteor\packages\barbatus_typescript\0
.2.8\plugin.typescript.os\npm\node_modules\meteor\barbatus_typescript-compiler\n
ode_modules\async\lib\async.js:210:22)
at TypeScriptCompiler.processFilesForTarget
(packages/barbatus:typescript-compiler/typescript-compiler.js:56:11)
`

TypeError: Cannot call method 'getExecutingFilePath' of undefined

I'm trying to run unit testing with angular2 + meteor integration. To do this, I'm using the angular2/testing library, i've added typings for jasmine to my project, and i'm using the meteor test (with a driver) command like so:

meteor test --driver-package practicalmeteor:mocha

When I try this, I get the following stack trace (with this module being at the top of the callstack):

W20160420-22:51:38.596(-4)? (STDERR) /Users/bsmith/.meteor/packages/meteor-tool/.1.3.2_3.1b2x6pq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:267 W20160420-22:51:38.596(-4)? (STDERR) throw(ex); W20160420-22:51:38.596(-4)? (STDERR) ^ W20160420-22:51:38.598(-4)? (STDERR) TypeError: Cannot call method 'getExecutingFilePath' of undefined W20160420-22:51:38.598(-4)? (STDERR) at Object.<anonymous> (/Users/bsmith/.meteor/packages/barbatus_typescript-compiler/.0.5.5.1drha14++os+web.browser+web.cordova/npm/node_modules/meteor-typescript/files-source-host.js:29:23) W20160420-22:51:38.598(-4)? (STDERR) at Module._compile (module.js:456:26) W20160420-22:51:38.598(-4)? (STDERR) at Object.Module._extensions..js (module.js:474:10) W20160420-22:51:38.598(-4)? (STDERR) at Module.load (module.js:356:32) W20160420-22:51:38.599(-4)? (STDERR) at Function.Module._load (module.js:312:12) W20160420-22:51:38.599(-4)? (STDERR) at Module.require (module.js:364:17) W20160420-22:51:38.599(-4)? (STDERR) at require (module.js:380:17) W20160420-22:51:38.599(-4)? (STDERR) at Object.<anonymous> (/Users/bsmith/.meteor/packages/barbatus_typescript-compiler/.0.5.5.1drha14++os+web.browser+web.cordova/npm/node_modules/meteor-typescript/compile-service.js:6:18) W20160420-22:51:38.599(-4)? (STDERR) at Module._compile (module.js:456:26) W20160420-22:51:38.599(-4)? (STDERR) at Object.Module._extensions..js (module.js:474:10)

Any pointers/tips?

Parsing tsconfig.json

Do you have any reason why you don't parse compiler options as are defined in tsconfig.json schema?
I am talking about target and jsx options. I have to use internal constants to get it to work.
Example: to target es3 and compile jsx, I have to use: target: 0, jsx: 2

From tsconfig.json schema:
target: { description: "Specify ECMAScript target version.", enum: ["es3", "es5", "es6", "es2015" ], default: "es5" },
jsx: { description: "Specify JSX code generation: 'preserve' or 'react'.", enum: [ "preserve", "react" ] },

https://github.com/Microsoft/TypeScript/wiki/Compiler-Options
http://json.schemastore.org/tsconfig

Object [object Object] has no method 'existsSync'

I have just migrated meteor to 1.3.3 which now uses npm 2.15.1 and the fs.existsSync function is deprecated since version 1.0 of npm, now on version 2 it's removed doc

versions for barbatus packages.

barbatus:[email protected]_1
barbatus:[email protected]
barbatus:[email protected]_2
barbatus:[email protected]
barbatus:[email protected]
barbatus:[email protected]
barbatus:[email protected]

After that I'm not able to start the app, I can see this entry on the logs.

While processing files with barbatus:angular2 (for target web.browser): packages/barbatus:ng2-typescript-compiler/typescript-compiler.js:104:14: Object [object Object] has no method 'existsSync' at TypeScriptCompiler.copyTypings (packages/barbatus:ng2-typescript-compiler/typescript-compiler.js:104:14) at packages/barbatus:ng2-typescript-compiler/typescript-compiler.js:64:16 at Array.forEach (native) at TypeScriptCompiler.processTypings (packages/barbatus:ng2-typescript-compiler/typescript-compiler.js:50:11) at TypeScriptCompiler.processFilesForTarget (packages/barbatus:ng2-typescript-compiler/typescript-compiler.js:115:12)

Is there something I can to to fix this?
Thanks.

Question re: typescript version

Great package -- thanks for the hard work.

I looked through the source but couldn't seem to pin down exactly where the typescript compiler version gets plugged in. I was thinking of forking and bumping to try to get rid of a React compilation error that I am getting that I think was fixed in Typescript 1.8+ (this error).

Any chance you could provide me some insight?

Thanks.
Jacob

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.