Closed rexim closed 9 years ago
Honestly I cannot get any fucking piece of node to work on Debian-based (Ubuntu 14.04.1) distro. Every miserable piece of javascript crying about absent node
executable. And the node
itself is called nodejs
here. Debian is not my favorite OS.
Hm, even in that kingdom of cocksuckery I've finally managed to get this fucksmith node to work. I had the following:
$ nodejs --version
v0.10.25
$ npm --version
1.3.10
From your report it seems that you have a very outdated version of npm. Could you update that?
Ok, I'll try
Actually, my npm is not that outdated:
npm ERR! npm v2.10.1
Sorry, that was my mistake. Your npm is ok.
Could you please remove node_modules
, make npm install
again and post its output here?
$ npm install
npm WARN package.json catberry-ts@0.0.0 No repository field.
npm WARN package.json catberry-ts@0.0.0 No license field.
npm WARN prefer global typescript@1.4.1 should be installed with -g
npm WARN engine joi@4.9.0: wanted: {"node":">=0.10.30"} (current: {"node":"0.10.25","npm":"2.11.0"})
npm WARN peerDependencies The peer dependency minichain@~0.0.1 included from minitable will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN engine topo@1.0.2: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.25","npm":"2.11.0"})
npm WARN prefer global tsd@0.6.0 should be installed with -g
|
> catberry-ts@0.0.0 install /home/rexim/Programming/mine/catberry-ts
> tsd reinstall -s
-> running reinstall
>> written 6 files:
- es6-promise/es6-promise.d.ts
- gulp-typescript/gulp-typescript.d.ts
- gulp/gulp.d.ts
- node/node.d.ts
- shelljs/shelljs.d.ts
- xml2js/xml2js.d.ts
shelljs@0.3.0 node_modules/shelljs
es6-promise@2.1.1 node_modules/es6-promise
typescript@1.4.1 node_modules/typescript
typescript-register@1.1.0 node_modules/typescript-register
├── sanitize-filename@1.3.0
└── chalk@0.5.1 (escape-string-regexp@1.0.3, ansi-styles@1.1.0, supports-color@0.2.0, has-ansi@0.1.0, strip-ansi@0.3.0)
gulp-typescript@2.7.7 node_modules/gulp-typescript
├── source-map@0.4.2 (amdefine@0.1.1)
├── through2@0.6.5 (xtend@4.0.0, readable-stream@1.0.33)
├── gulp-util@3.0.5 (array-differ@1.0.0, beeper@1.1.0, array-uniq@1.0.2, lodash._reescape@3.0.0, lodash._reinterpolate@3.0.0, lodash._reevaluate@3.0.0, object-assign@2.1.1, replace-ext@0.0.1, minimist@1.1.1, chalk@1.0.0, vinyl@0.4.6, lodash.template@3.6.1, multipipe@0.1.2, dateformat@1.0.11)
└── vinyl-fs@1.0.0 (merge-stream@0.1.7, object-assign@2.1.1, graceful-fs@3.0.8, strip-bom@1.0.0, vinyl@0.4.6, mkdirp@0.5.1, duplexify@3.4.2, glob-stream@4.1.1, glob-watcher@0.0.8)
gulp@3.9.0 node_modules/gulp
├── pretty-hrtime@1.0.0
├── interpret@0.6.2
├── deprecated@0.0.1
├── archy@1.0.0
├── minimist@1.1.1
├── semver@4.3.6
├── tildify@1.1.0 (os-homedir@1.0.0)
├── v8flags@2.0.7 (user-home@1.1.1)
├── chalk@1.0.0 (escape-string-regexp@1.0.3, ansi-styles@2.0.1, supports-color@1.3.1, strip-ansi@2.0.1, has-ansi@1.0.3)
├── orchestrator@0.3.7 (stream-consume@0.1.0, sequencify@0.0.7, end-of-stream@0.1.5)
├── liftoff@2.1.0 (extend@2.0.1, rechoir@0.6.1, flagged-respawn@0.3.1, resolve@1.1.6, findup-sync@0.2.1)
├── gulp-util@3.0.5 (array-differ@1.0.0, beeper@1.1.0, array-uniq@1.0.2, lodash._reescape@3.0.0, lodash._reinterpolate@3.0.0, lodash._reevaluate@3.0.0, object-assign@2.1.1, replace-ext@0.0.1, vinyl@0.4.6, lodash.template@3.6.1, through2@0.6.5, multipipe@0.1.2, dateformat@1.0.11)
└── vinyl-fs@0.3.13 (graceful-fs@3.0.8, strip-bom@1.0.0, defaults@1.0.2, vinyl@0.4.6, mkdirp@0.5.1, through2@0.6.5, glob-stream@3.1.18, glob-watcher@0.0.6)
xml2js@0.4.8 node_modules/xml2js
├── sax@0.6.1
└── xmlbuilder@2.6.4 (lodash@3.9.3)
tsd@0.6.0 node_modules/tsd
├── assertion-error@1.0.0
├── deep-freeze@0.0.1
├── joi-assert@0.0.3
├── type-detect@0.1.2
├── rimraf@2.2.8
├── open@0.0.5
├── jsesc@0.5.0
├── lru-cache@2.5.2
├── ministyle@0.1.4
├── minimist@1.1.1
├── uuid@2.0.1
├── exit@0.1.2
├── detect-indent@0.2.0 (get-stdin@0.1.0, minimist@0.1.0)
├── json-pointer@0.2.2 (foreach@2.0.5)
├── miniwrite@0.1.4 (mkdirp@0.3.5)
├── minimatch@1.0.0 (sigmund@1.0.1)
├── minichain@0.0.1
├── minitable@0.0.3 (minichain@0.0.1)
├── semver@4.3.6
├── mkdirp@0.5.1 (minimist@0.0.8)
├── event-stream@3.1.7 (stream-combiner@0.0.4, duplexer@0.1.1, from@0.1.3, pause-stream@0.0.11, map-stream@0.1.0, split@0.2.10, through@2.3.7)
├── uri-templates@0.1.7
├── bl@0.9.4 (readable-stream@1.0.33)
├── universal-analytics@0.3.8 (async@0.2.10, node-uuid@1.4.3, underscore@1.8.3)
├── definition-header@0.1.0 (xregexp@2.0.0, parsimmon@0.5.1)
├── glob@4.5.3 (inherits@2.0.1, once@1.3.2, inflight@1.0.4, minimatch@2.0.8)
├── bluebird@1.2.4
├── lazy.js@0.3.2
├── request@2.58.0 (caseless@0.10.0, aws-sign2@0.5.0, forever-agent@0.6.1, stringstream@0.0.4, tunnel-agent@0.4.0, oauth-sign@0.8.0, isstream@0.1.2, extend@2.0.1, json-stringify-safe@5.0.1, node-uuid@1.4.3, qs@3.1.0, combined-stream@1.0.5, mime-types@2.0.14, http-signature@0.11.0, tough-cookie@2.0.0, form-data@1.0.0-rc1, hawk@2.3.1, har-validator@1.8.0)
├── update-notifier@0.2.2 (is-npm@1.0.0, semver-diff@2.0.0, string-length@1.0.0, chalk@0.5.1, latest-version@1.0.1, configstore@0.3.2)
├── verror@1.4.0 (extsprintf@1.0.3)
└── joi@4.9.0 (topo@1.0.2, isemail@1.1.1, hoek@2.14.0, moment@2.10.3)
jsdoc@3.3.0 node_modules/jsdoc
├── escape-string-regexp@1.0.3
├── strip-json-comments@1.0.2
├── taffydb@2.6.2
├── underscore@1.7.0
├── async@0.9.2
├── js2xmlparser@0.1.9
├── wrench@1.5.8
├── marked@0.3.3
├── requizzle@0.2.1 (underscore@1.6.0)
├── esprima@1.1.0-dev-harmony
└── catharsis@0.8.7 (underscore-contrib@0.3.0)
Could you please execute the following in the catberry-ts
directory?
$ nodejs
> var tits = require('typescript-register');
undefined
> tits
{}
I still cannot get why it doesn't load the typescript-register for you.
Ta-Da!
$ nodejs
> var tits = require ('typescript-register');
Error: Cannot find module 'typescript-register'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at repl:1:12
at REPLServer.self.eval (repl.js:110:21)
at repl.js:249:20
at REPLServer.self.eval (repl.js:122:7)
at Interface.<anonymous> (repl.js:239:12)
at Interface.EventEmitter.emit (events.js:95:17)
>
Hm... Maybe I should install it globally?
It seems that you have no tits. Show me
ls node_modules
No, you shouldn't install it globally. It should be fine as-is.
No, I have them!!
$ ls node_modules
es6-promise gulp gulp-typescript jsdoc shelljs tsd typescript typescript-register xml2js
They are simply barely visible ._.
$ ls node_modules/typescript-register/
I mean not visible for node at all =(
$ find node_modules/typescript-register
node_modules/typescript-register
node_modules/typescript-register/node_modules
node_modules/typescript-register/node_modules/chalk
node_modules/typescript-register/node_modules/chalk/index.js
node_modules/typescript-register/node_modules/chalk/node_modules
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/index.js
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/node_modules
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/cli.js
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/package.json
node_modules/typescript-register/node_modules/chalk/node_modules/has-ansi/readme.md
node_modules/typescript-register/node_modules/chalk/node_modules/.bin
node_modules/typescript-register/node_modules/chalk/node_modules/.bin/has-ansi
node_modules/typescript-register/node_modules/chalk/node_modules/.bin/supports-color
node_modules/typescript-register/node_modules/chalk/node_modules/.bin/strip-ansi
node_modules/typescript-register/node_modules/chalk/node_modules/escape-string-regexp
node_modules/typescript-register/node_modules/chalk/node_modules/escape-string-regexp/index.js
node_modules/typescript-register/node_modules/chalk/node_modules/escape-string-regexp/package.json
node_modules/typescript-register/node_modules/chalk/node_modules/escape-string-regexp/readme.md
node_modules/typescript-register/node_modules/chalk/node_modules/ansi-styles
node_modules/typescript-register/node_modules/chalk/node_modules/ansi-styles/index.js
node_modules/typescript-register/node_modules/chalk/node_modules/ansi-styles/package.json
node_modules/typescript-register/node_modules/chalk/node_modules/ansi-styles/readme.md
node_modules/typescript-register/node_modules/chalk/node_modules/supports-color
node_modules/typescript-register/node_modules/chalk/node_modules/supports-color/index.js
node_modules/typescript-register/node_modules/chalk/node_modules/supports-color/cli.js
node_modules/typescript-register/node_modules/chalk/node_modules/supports-color/package.json
node_modules/typescript-register/node_modules/chalk/node_modules/supports-color/readme.md
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/index.js
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/node_modules
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/cli.js
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/package.json
node_modules/typescript-register/node_modules/chalk/node_modules/strip-ansi/readme.md
node_modules/typescript-register/node_modules/chalk/package.json
node_modules/typescript-register/node_modules/chalk/readme.md
node_modules/typescript-register/node_modules/sanitize-filename
node_modules/typescript-register/node_modules/sanitize-filename/.npmignore
node_modules/typescript-register/node_modules/sanitize-filename/index.js
node_modules/typescript-register/node_modules/sanitize-filename/test.js
node_modules/typescript-register/node_modules/sanitize-filename/Changelog.md
node_modules/typescript-register/node_modules/sanitize-filename/.travis.yml
node_modules/typescript-register/node_modules/sanitize-filename/package.json
node_modules/typescript-register/node_modules/sanitize-filename/AUTHORS
node_modules/typescript-register/node_modules/sanitize-filename/README.md
node_modules/typescript-register/LICENSE
node_modules/typescript-register/package.json
node_modules/typescript-register/README.md
$ cat node_modules/typescript-register/package.json
$ cat node_modules/typescript-register/package.json
{
"name": "typescript-register",
"version": "1.1.0",
"description": "Extension to require TypeScript files from Node",
"main": "index.js",
"files": [
"README.md",
"LICENSE",
"*.js"
],
"scripts": {
"compile": "tsc index.ts test/spec.ts --module commonjs --noImplicitAny",
"coverage": "cat ./coverage/lcov.info | coveralls",
"test": "istanbul cover node_modules/mocha/bin/_mocha",
"typings": "tsd reinstall"
},
"repository": {
"type": "git",
"url": "git+https://github.com/pspeter3/typescript-register.git"
},
"keywords": [
"typescript",
"require",
"interpret"
],
"author": {
"name": "Phips Peter"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/pspeter3/typescript-register/issues"
},
"homepage": "https://github.com/pspeter3/typescript-register",
"dependencies": {
"chalk": "^0.5.1",
"sanitize-filename": "^1.3.0",
"typescript": "^1.4.1"
},
"devDependencies": {
"chai": "^1.10.0",
"coveralls": "^2.11.2",
"istanbul": "^0.3.5",
"mocha": "^2.1.0",
"tsd": "^0.6.0-beta.5"
},
"readme": "# TypeScript Register [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage][coveralls-image]][coveralls-url]\n\nExtension to require TypeScript files from Node. This project is an alternative to [typescript-require][typescript-require]. The main differences are:\n\n- Dependencies are run in the same context as the parent\n- Uses the TypeScript API as opposed to forking `tsc`\n- Caches dependencies in `/tmp/typescript-register/:your/:path/:here`\n\n## Examples\n\n### foo.ts\n\n```ts\nexport var foo = 3;\n```\n\n### bar.js\n```js\nrequire('typescript-register');\nvar foo = require('./foo');\n\nconsole.log(foo.foo);\n```\n\n## Installation\n\nInstall with npm:\n\n```\nnpm install typescript-register\n```\n\n## Configuration\n\nThere are three configuration options which are read from environment variables. The configuration options are read each time a module is required so you can programatically set them with: \n\n```js\nprocess.env[':name'] = ':value';\n```\n\nThe values are:\n\n- `TYPESCRIPT_REGISTER_EMIT_ERROR`: Whether or not emit fatal TypeScript errors\n- `TYPESCRIPT_REGISTER_USE_CACHE`: Whether or not to use previously emitted files\n- `TYPESCRIPT_REGISTER_COMPILER_OPTIONS`: The JSON stringified TypeScript compiler options\n\n## Contributing\n\nFeel free to fork and submit pull requests for the code! Please follow the existing code as an example of style and make sure that all your code passes tests.\n\n[npm-url]: https://www.npmjs.org/package/typescript-register\n[npm-image]: http://img.shields.io/npm/v/typescript-register.svg?style=flat-square\n\n[travis-url]: http://travis-ci.org/Asana/pspeter3/typescript-register\n[travis-image]: http://img.shields.io/travis/pspeter3/typescript-register/master.svg?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/pspeter3/typescript-register\n[coveralls-image]: https://img.shields.io/coveralls/pspeter3/typescript-register/master.svg?style=flat-square\n\n[typescript-require]: https://github.com/eknkc/typescript-require\n",
"readmeFilename": "README.md",
"_id": "typescript-register@1.1.0",
"_from": "typescript-register@>=1.1.0 <2.0.0"
}
There are no tits even after global installation of them =(
Fuck my dick, that's pretty strange. I have slightly another typescript-register but with the same version tag.
What do you mean by slightly another?
Here is my version of it. You can compare: https://gist.github.com/ForNeVeR/2d6cd8f2bbefc8eaeaf0
Could you post yours index.js
from typescript-register
so we can compare?
Here's my index.js
: https://gist.github.com/ForNeVeR/dc48265b4e6d9f37229d
Hm... Which one?
$ find typescript-register -name index.js
typescript-register/node_modules/chalk/index.js
typescript-register/node_modules/chalk/node_modules/has-ansi/index.js
typescript-register/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js
typescript-register/node_modules/chalk/node_modules/escape-string-regexp/index.js
typescript-register/node_modules/chalk/node_modules/ansi-styles/index.js
typescript-register/node_modules/chalk/node_modules/supports-color/index.js
typescript-register/node_modules/chalk/node_modules/strip-ansi/index.js
typescript-register/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js
typescript-register/node_modules/sanitize-filename/index.js
WHAT
!!!
I think we have found a fucking problem. You have no typescript-register/index.js
file.
Yep, but how can it be?
It could be true if package author have published the same version twice, first time was the damaged one. And you somehow have cached it.
Maybe you even got cached some fucking version from my stupid fork of this package.
Just put your file to my node_modules. npm run tsdef
works.
Yeah, maybe it's a cache. I'll try to investigate it today. Thank you very much uncle Never! :)
You could try npm cache rm typescript-register
Anyway, the problem has been solved.
Yep, it is definitely solved. Cleaning the cache helped. :)
See discussion on #16