cretz / pratphall

A typed language targeting PHP (abandoned)
http://cretz.github.io/pratphall/
Other
45 stars 5 forks source link

Trouble building #12

Closed catseye closed 11 years ago

catseye commented 11 years ago

I'm not too familiar with the node.js/npm ecosystem, so bear with me. It would be nice if these dependencies/steps could be documented.

I already had node.js and npm installed. Clearly pratphall requires jake, do I did

npm install -g jake

Then apparently, it requires fs-extra, so I did (in the pratphall directory)

npm install fs-extra

And got 0.5.0. Then, apparent that it also requires typescript, I did

npm install typescript

And got 0.8.0. But then I run into an error:

$ jake build
Compiling ppc and pratphall

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
TypeError: Object #<Object> has no method 'existsSync'
    at Object.findFile (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:21182:28)
    at CodeResolver.resolveCode (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:19700:43)
    at CodeResolver.resolveCode (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:19743:30)
    at CodeResolver.resolveCode (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:19740:30)
    at CodeResolver.resolveCode (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:19740:30)
    at CommandLineHost.resolveCompilationEnvironment (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:21492:22)
    at BatchCompiler.resolve (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:21508:40)
    at BatchCompiler.batchCompile (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:21854:76)
    at Object.<anonymous> (.../cretz/pratphall/node_modules/typescript/bin/tsc.js:21891:7)
    at Module._compile (module.js:441:26)
jake aborted.
ode_modules/typescript/bin/tsc.js:21182:28)
    at CodeResolver.resolveCode (.../cretz/pratphall

Seems to be inside typescript; does it require typescript >0.8.0?

catseye commented 11 years ago

OK, I found http://pratphall.org/#Manual-Appendices-Building (it would be nice[r] to have this in the README, imo)

But trying that method gives me

$ npm install
npm ERR! Couldn't read dependencies.

npm ERR! Failed to parse json
npm ERR! Unexpected token 
npm ERR! File: .../cretz/pratphall/package.json
(etc)
cretz commented 11 years ago

Did you "npm install" in the directory you cloned the git repo?

catseye commented 11 years ago

Yes. Just did it again now to confirm.

cretz commented 11 years ago

What version is your node? I literally ran these commands and it worked just fine:

~$ git clone --recursive https://github.com/cretz/pratphall.git
~$ cd pratphall/
pratphall$ npm install
pratphall$ node_modules/.bin/jake build

And it works on Windows too. Can you give me the full output from running those 4 commands in order?

catseye commented 11 years ago

node.js v0.6.12 -- that's possibly why, since the package.json wants 0.8.

I'll have to install 0.8 from source, since this is apparently the latest version available in my package system (Ubuntu 12.04 LTS).

Still, it's odd that some tools think it's well-formed JSON while others don't; I also tried

$ python -mjson.tool <package.json 
No JSON object could be decoded

...but pasting it into http://json.parser.online.fr/ , it parsed fine.

cretz commented 11 years ago

Yeah, you really need the latest nodejs.