brn / typescript-middleware Goto Github PK
View Code? Open in Web Editor NEWtypescript compile server for [connect/express]-middleware
typescript compile server for [connect/express]-middleware
Hey,
Just giving this a go for the first time. When running my application I get:
D:\Projects\GitHub\studiosnail\node_modules\typescript-middleware\lib\typescript.inject.js:26
})();
^
Error: typescript is not installed yet.
run 'npm install typescript -g'
at D:\Projects\GitHub\studiosnail\node_modules\typescript-middleware\lib\typescript.inject.js:24:13
at Object.<anonymous> (D:\Projects\GitHub\studiosnail\node_modules\typescript-middleware\lib\typescript.inject.js:26:5)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\Projects\GitHub\studiosnail\node_modules\typescript-middleware\lib\compiler.js:9:18)
However running npm install typescript -g
does not resolve the issue.
require('typescript-middleware')
prints tsc usage help in command line.
I used [email protected] installed from npm.
Modifying the entry file does not cause a rebuild.
Linux Mint 18.3, Node v8.10.0, Express 4.15.5, TypeScript 2.7.2
Changing resolved.resolved
to [{ path: ts }].concat(resolved.resolved)
at middleware.js:146 should fix the problem.
ありがとうございます
Hope the trace helps. Local install, no packages installed globally.
/node_modules/typescript-middleware/lib/option-parser.js:124
if (!pathutil.exists(filePath)) {
^
TypeError: undefined is not a function
at OptionParser._setLanguageAndTerritory (/node_modules/typescript-middleware/lib/option-parser.js:124:17)
at OptionParser._setLocale (/node_modules/typescript-middleware/lib/option-parser.js:104:13)
at OptionParser.parse (/node_modules/typescript-middleware/lib/option-parser.js:87:15)
at module.exports (/node_modules/typescript-middleware/lib/middleware.js:171:16)
at Object.<anonymous> (/gulpfile.js:29:31)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
node --version => v0.12.0
gulp --version => 3.8.11
tsc --version => 1.4.1.0
Hello!
Thankyou for this extremely useful repo. I may have found a bug. I don't think these lines are quite working as you might expect - https://github.com/brn/typescript-middleware/blob/master/lib/middleware.js#L146-L148
I found that my typescript never got compiled when my output directory was empty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.