Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install on windows #18

Closed
Bartvds opened this issue Mar 8, 2014 · 7 comments
Closed

Cannot install on windows #18

Bartvds opened this issue Mar 8, 2014 · 7 comments

Comments

@Bartvds
Copy link

Bartvds commented Mar 8, 2014

I'd tried installing parsimmon from npm on a windows workstation but installation bails on the pjs dependency:

The pjs module has a npm install script that runs make, which obviously doesn't exist on vanilla windows.

Ticket here: jneen/pjs#28

@jneen
Copy link
Owner

jneen commented Mar 12, 2014

Should be fixed in 0.2.1 and newer. If you could verify I'll close the ticket.

@Bartvds
Copy link
Author

Bartvds commented Mar 12, 2014

It installs without error:

parsimmon@0.3.1 node_modules\parsimmon
└── pjs@5.1.0

But when I try to use it I get this:

module.js:340
    throw err;
          ^
Error: Cannot find module './build/p.commonjs'
    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.<anonymous> (D:\project\node_m
odules\parsimmon\node_modules\pjs\index.js:1:75)
    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 Module.require (module.js:364:17)

@Bartvds
Copy link
Author

Bartvds commented Mar 14, 2014

@jayferd Just a heads up; but did you catch this last message?

I think you might want to look into it: the npm install parsimmon@latest is broken.

I see this error from 0.2.1 up and I think it is not just windows.

@jneen
Copy link
Owner

jneen commented Mar 18, 2014

I'm a bit confused - it installs just fine for me at 0.3.1.

@jneen
Copy link
Owner

jneen commented Mar 18, 2014

$ npm install parsimmon
npm http GET https://registry.npmjs.org/parsimmon
npm http 304 https://registry.npmjs.org/parsimmon
npm http GET https://registry.npmjs.org/pjs
npm http 304 https://registry.npmjs.org/pjs
parsimmon@0.3.1 node_modules/parsimmon
└── pjs@5.1.0

$ node -pe 'require("parsimmon")'
{ string: [Function],
  regex: [Function],
  succeed: [Function],
  fail: [Function],
  letter: { _: [Function] },
  letters: { _: [Function] },
  digit: { _: [Function] },
  digits: { _: [Function] },
  whitespace: { _: [Function] },
  optWhitespace: { _: [Function] },
  any: { _: [Function] },
  all: { _: [Function] },
  eof: { _: [Function] },
  lazy: [Function],
  seq: [Function],
  alt: [Function],
  index: { _: [Function] },
  of: [Function],
  Parser: 
   { [Function: C]
     Bare: [Function: Bare],
     p: 
      { constructor: [Circular],
        init: [Function],
        parse: [Function],
        or: [Function],
        then: [Function],
        many: [Function],
        times: [Function],
        result: [Function],
        atMost: [Function],
        atLeast: [Function],
        map: [Function],
        skip: [Function],
        mark: [Function],
        concat: [Function],
        empty: [Object],
        of: [Function],
        ap: [Function],
        chain: [Function] },
     extend: [Function],
     open: [Function],
     of: [Function] } }

@jneen
Copy link
Owner

jneen commented Mar 18, 2014

Unless it's a backslash thing...? If you edit index.js and replace the / with \\ does it work?

@Bartvds
Copy link
Author

Bartvds commented Mar 19, 2014

I re-tried after deleting the parsimmon and pjs from my npm-cache, and it works.


If compare the content of the previous and current PJS tarballs (both 5.1.0) then the older one was missing the ./build directory. Sizes are reported differently too:

#  Archive 5.1.0\package.tgz
2014-03-09 20:12           589             0  package\package.json
2014-03-09 20:12          6048             0  package\README.md
2014-03-09 20:12           100             0  package\index.js
2014-03-09 20:12          1209             0  package\CHANGELOG.md
2014-03-09 20:12          1273             0  package\Makefile
2014-03-09 20:12          2675             0  package\src\p.js
2014-03-09 20:12            16             0  package\src\amd\post.js
2014-03-09 20:12            28             0  package\src\amd\pre.js
2014-03-09 20:12            16             0  package\src\commonjs\post.js
2014-03-09 20:12             9             0  package\src\commonjs\pre.js
2014-03-09 20:12          7069             0  package\test\p.test.js
#
# Total                   Size        Packed  Files
#                        19032             0  11
#  Archive 5.1.0\package.tgz
2014-03-19 16:50           570             0  package\package.json
2014-03-19 16:50          5862             0  package\README.md
2014-03-19 16:50            98             0  package\index.js
2014-03-19 16:50          1167             0  package\CHANGELOG.md
2014-03-19 16:50          1207             0  package\Makefile
2014-03-19 16:50          2626             0  package\build\p.commonjs.js
2014-03-19 16:50          2603             0  package\src\p.js
2014-03-19 16:50            14             0  package\src\amd\post.js
2014-03-19 16:50            27             0  package\src\amd\pre.js
2014-03-19 16:50            15             0  package\src\commonjs\post.js
2014-03-19 16:50             8             0  package\src\commonjs\pre.js
2014-03-19 16:50          6812             0  package\test\p.test.js
#
# Total                   Size        Packed  Files
#                        21009             0  12

If I then do a diff it is still same content (except the missing file), but with different file sizes.

No idea what is going on here but one version number served different before bits then it does now.

Or else it probably is npm being difficult (happens a lot lately). I am now also running a more recent node (0.11.x) / npm then before.

But it works now so I think it is cool, let's close this up.

@Bartvds Bartvds closed this as completed Mar 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants