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

Version 3 of less causes TypeError: Object [object Object] has no method 'tryLoadPlugin' #730

Closed
dbdean opened this issue Oct 13, 2017 · 0 comments

Comments

@dbdean
Copy link
Contributor

dbdean commented Oct 13, 2017

If you run docker-compose build at the moment, npm install pulls in less=3.0.0, and this causes an error upon invoking less:

Step 19/21 : RUN invoke less
 ---> Running in 089ec6915a80
Downloading from pypi -> /srv/nbviewer/notebook-5.0.0.tar.gz
Collecting notebook==5.0.0
  Downloading notebook-5.0.0.tar.gz (11.5MB)
  Saved ./notebook-5.0.0.tar.gz
Successfully downloaded notebook
[TypeError: Object [object Object] has no method 'tryLoadPlugin']
Extract /srv/nbviewer/notebook-5.0.0.tar.gz in None
ERROR: Service 'nbviewer' failed to build: The command '/bin/sh -c invoke less' returned a non-zero code: 1

This appears to be related to a bug in less 3.0.0, where the tryLoadPlugin is not a function: less/less.js#3116

It can be fixed by pinning less to the latest non-3.0.0 release, but hopefully will be fixed in less itself quickly, so I haven't put in a PR for this project just yet, as it may soon be moot (here's hoping)

diff --git a/package.json b/package.json
index 62bcce1..0cdc821 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
     "watch-less": "./node_modules/.bin/watch 'invoke less' ./nbviewer/static/less"
   },
   "devDependencies": {
-    "less": "*",
+    "less": "2.7.2",
     "less-plugin-autoprefix": "*",
     "less-plugin-clean-css": "*",
     "bower": "*",
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

1 participant