webspecs / url

The URL specification
https://specs.webplatform.org/url/webspecs/develop/
Other
21 stars 9 forks source link

Cannot find module 'pegjs' #40

Open duerst opened 9 years ago

duerst commented 9 years ago

After I have installed pegjs <<<< $ npm install -g pegjs C:\Users\duerst\AppData\Roaming\npm\pegjs -> C:\Users\duerst\AppData\Roaming\npm\node_modules\pegjs\bin\pegjs pegjs@0.8.0 C:\Users\duerst\AppData\Roaming\npm\node_modules\pegjs

I'm running make, and get the error below (this is on cygwin):

$ make node peg2json.js > url.pegjson

module.js:340 throw err; ^ Error: Cannot find module 'pegjs' 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 Object. (C:\Project\duerst\2015\URL\peg2json.js:2:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) Makefile:32: recipe for target 'url.pegjson' failed make: *\ [url.pegjson] Error 8

rubys commented 9 years ago

I haven't used cygwin in years, but it appears that cygwin is no longer supported by nodejs: https://github.com/joyent/node/wiki/Installation#building-on-cygwin

What are you trying to do? Can you run node peg2json.js from a "normal" Windows command prompt?

duerst commented 9 years ago

I'm trying to add the Ruby URI library to your tests. That in itself looks like a piece of cake especially because addressable kept much of the interface of that library. But getting bootstrapped to have the test data available in the form that the tests actually process is where I got into problems.

rubys commented 9 years ago

You can download the input you need from https://url.spec.whatwg.org/interop/urltestdata.json. If you get the test program working with that input, I can make the necessary Makefile changes and publish the results.

rubys commented 9 years ago

Another option: would you be willing to run a VM (using a tool like VirtualBox to set it up)? If so, I could work on setting up such a ready-to-go VM that you could use.

duerst commented 9 years ago

Thanks for the pointer to https://url.spec.whatwg.org/interop/urltestdata.json, that should get me over this issue (and is much easier than using a VM).