kiln / flourish-sdk

The SDK for developing Flourish templates
Other
80 stars 16 forks source link

lessc failing on Windows? #61

Open robinhouston opened 4 years ago

robinhouston commented 4 years ago

We’ve had a report from a Windows user that simply creating a new template with flourish new and then trying to run it using flourish run results in a build error at the stylesheet compilation stage.

robinhouston commented 4 years ago

This is the log:

untitled_flourish_template@1.0.0 build C:\Users\aziznitham[home
rollup -c
untitled_flourish_template@1.0.0 less C:\Users\aziznitham[home
lessc --plugin=less-plugin-clean-css --source-map less/style.less static/style.css
internal/modules/cjs/loader.js:796
throw err;
^
Error: Cannot find module 'tslib'
Require stack:
C:\Users\aziznitham[home\node_modules\less\bin\lessc
 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
 at Function.Module._load (internal/modules/cjs/loader.js:686:27)
 at Module.require (internal/modules/cjs/loader.js:848:19)
 at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\aziznitham[home\node_modules\less\bin\lessc:9:13)
 at Module._compile (internal/modules/cjs/loader.js:955:30)
 at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
 at Module.load (internal/modules/cjs/loader.js:811:32)
 at Function.Module._load (internal/modules/cjs/loader.js:723:14)
 at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'C:\Users\aziznitham\[home\node_modules\less\bin\lessc' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! untitled_flourish_template@1.0.0 less: lessc --plugin=less-plugin-clean-css --source-map less/style.less static/style.css
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the untitled_flourish_template@1.0.0 less script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aziznitham\AppData\Roaming\npm-cache_logs\2020-02-10T19_32_55_684Z-debug.log
� Failed to build template
� Failed to run build command ‘npm run less’
C:\Users\aziznitham>
src/index.js → template.js...
created template.js in 657ms
robinhouston commented 4 years ago

I have not been able to reproduce this on Windows 10 with NodeJS version 10.

aubhi89 commented 1 year ago

I was also having an issue where running flourish run would give me a build error. I was trying to run the command in a Google Drive folder. I switched to a local folder and it now works fine.