mozilla / id.webmaker.org

OAuth 2.0 identity provider for Webmaker
https://id.webmaker.org
Mozilla Public License 2.0
18 stars 51 forks source link

fresh clone fails the postinstall `npm start` due to less errors #413

Closed Pomax closed 8 years ago

Pomax commented 8 years ago

It looks like the version of less (and possibly autoless) we're using is not compatible with how we're using it. An install, with automatic post-install kick yields:

> id.webmaker.org@1.0.0 start /home/pomax/Documents/Git/id.webmaker.org
> npm-run-all --parallel server watch:css watch:js 

> id.webmaker.org@1.0.0 watch:css /home/pomax/Documents/Git/id.webmaker.org
> autoless --source-map templates/less public

> id.webmaker.org@1.0.0 server /home/pomax/Documents/Git/id.webmaker.org
> node web/index.js

> id.webmaker.org@1.0.0 watch:js /home/pomax/Documents/Git/id.webmaker.org
> npm run build:js -- --watch

Finding files...
/home/pomax/Documents/Git/id.webmaker.org/node_modules/less/lib/less/parser/parser.js:117
            imports.contents[fileInfo.filename] = str;
                   ^

TypeError: Cannot read property 'contents' of undefined
    at Object.Parser.parse (/home/pomax/Documents/Git/id.webmaker.org/node_modules/less/lib/less/parser/parser.js:117:20)
    at Object.LessFile.parse (/home/pomax/Documents/Git/id.webmaker.org/node_modules/autoless/lib/lessfile.js:30:12)
    at EventEmitter.Manager._update (/home/pomax/Documents/Git/id.webmaker.org/node_modules/autoless/lib/manager.js:29:12)
    at /home/pomax/Documents/Git/id.webmaker.org/node_modules/autoless/lib/manager.js:48:12
    at Array.forEach (native)
    at EventEmitter.Manager.addFiles (/home/pomax/Documents/Git/id.webmaker.org/node_modules/autoless/lib/manager.js:46:9)
    at /home/pomax/Documents/Git/id.webmaker.org/node_modules/autoless/bin/autoless:110:11
    at /home/pomax/Documents/Git/id.webmaker.org/node_modules/watch/main.js:128:14
    at /home/pomax/Documents/Git/id.webmaker.org/node_modules/watch/main.js:108:5
    at /home/pomax/Documents/Git/id.webmaker.org/node_modules/watch/main.js:57:23

autoless in this case gobbles the actually useful information that less is putting out, but it strongly looks like autoless is not using a version of less that it can actually work with. Autoless needs a less version of 1.7.5, but something else installs less 2.4.0, so we need to make sure to explicitly require less 1.7.5 as part of our own dependencies chain

Pomax commented 8 years ago

@cadecairos should we close this?

dcforeman commented 8 years ago

Only if it's been fixed!