-
Notifications
You must be signed in to change notification settings - Fork 54
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
I was unable to test code for url.peg #46
Comments
@machinshin I just ran into the same issue. I suspect something in the npm package is out of date. I was able to work around this by building canopy from source, following the instructions in CONTRIBUTING.md. The executable created there works just fine. |
Encountered same problem, demo examples do not work, throws invalid options argument error, and @sumginazu's workaround did not work either. It's really a pity for such a reputable and widely used library. |
fwiw - the problem is mkdirp was converted in 1.x to promises so the syntax invoked in canopy needs updating to --- node_modules/canopy/bin/canopy 2020-11-23 01:17:52.459859400 -0800
+++ canopy-0.3.0-mkdirp-1.x-patch/canopy 2020-11-23 01:19:03.316873075 -0800
@@ -29,7 +29,7 @@
var name = names[index];
if (!name) return;
- mkdirp(path.dirname(name), function(error) {
+ mkdirp(path.dirname(name)).then(function(){
fs.writeFileSync(name, parser[name]);
write(index + 1);
}); so that's a quick patch if you feel like hacking the post npm installed result. not sure if the author intends on releasing an interim patch to deal with it since 0.3.0 was 5 years back but that solved my use case to just get it running. ymmv. efforts to pin mkdirp to 0.5.1 fell down a npm hole where package{,-lock}.json and npm-shrinkwrap.json all stomp on one another and none of them allow regressing a specific dependency. if somebody figures out a solution to that so be it. |
stumbled on the same issue, since 0.4.0 is lagging can we just have a 0.3.1 with this fixed ? |
I also had this error and got it working with the above patch. @jcoglan a fix release to keep current release installable without patching would be nice. |
+1, I experienced this also when trying to run the tutorial. The patch by teichopsia fixed it for me. |
This issue is fixed in |
This should now be fixed as part of the v0.4 release; see https://blog.jcoglan.com/2022/04/01/announcing-canopy-0-4/ |
I tried going through the examples of javascript usage here:
http://canopy.jcoglan.com/langs/javascript.html
but i get the following error:
can anyone tell me what the issue here is?
The text was updated successfully, but these errors were encountered: