Comments (7)
Should be fixed in 0.2.1 and newer. If you could verify I'll close the ticket.
from parsimmon.
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.
@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.
I'm a bit confused - it installs just fine for me at 0.3.1.
from parsimmon.
$ 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.
Unless it's a backslash thing...? If you edit index.js
and replace the /
with \\
does it work?
from parsimmon.
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)
- Regex dotAll support (/s flag) HOT 2
- MS Edge 18 error HOT 9
- Question: What's wrong with my parser? HOT 3
- Question: How to parse html comment HOT 4
- Ignoring XML like tags when encountered inside XML like tags HOT 2
- The library doesn't include type definitions HOT 1
- Add parser methods wrapTimes, wrapAtLeast, wrapAtMost and wrapMany HOT 6
- Unneeded code dublication in formatGot HOT 4
- How do I properly nest then/or/atLeast parsers? HOT 3
- How can I parse the inside and outside of the parentheses? HOT 1
- Question HOT 9
- Question about parsing "define <name> [as <internalName>]" style grammar HOT 4
- Question: Is it possible to get consumed part of string from the parser result? HOT 1
- Import Parsimmon HOT 7
- Question: how to do an intersection of optional parsers? HOT 4
- Parsimmon.index yields incorrect position for tokens right before a newline ('\n') HOT 10
- Incorrect error formatting HOT 5
- Is there a way to do something like "everything up until SomeParser" HOT 4
- Use all the groups from regex HOT 3
- Slow parsing performance HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parsimmon.