Coder Social home page Coder Social logo

Cannot install on windows about parsimmon HOT 7 CLOSED

jneen avatar jneen commented on August 19, 2024
Cannot install on windows

from parsimmon.

Comments (7)

jneen avatar jneen commented on August 19, 2024

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

from parsimmon.

Bartvds avatar Bartvds commented on August 19, 2024

It installs without error:

[email protected] node_modules\parsimmon
└── [email protected]

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)

from parsimmon.

Bartvds avatar Bartvds commented on August 19, 2024

@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.

from parsimmon.

jneen avatar jneen commented on August 19, 2024

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

from parsimmon.

jneen avatar jneen commented on August 19, 2024
$ 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
[email protected] node_modules/parsimmon
└── [email protected]

$ 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] } }

from parsimmon.

jneen avatar jneen commented on August 19, 2024

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

from parsimmon.

Bartvds avatar Bartvds commented on August 19, 2024

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.

from parsimmon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.