You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a number of empty files in our project and we got this error when we tried to move to sass
TypeError: Cannot read property 'css' of undefined
at /home/mabs/project/LYT3/nativescript/node_modules/nativescript-dev-sass/lib/converter.js:74:39
at Object.module.exports.render (/home/mabs/project/LYT3/nativescript/node_modules/nativescript-dev-sass/node_modules/node-sass/lib/index.js:376:5)
at parseSass (/home/mabs/project/LYT3/nativescript/node_modules/nativescript-dev-sass/lib/converter.js:58:8)
at loopSassFilesAsync (/home/mabs/project/LYT3/nativescript/node_modules/nativescript-dev-sass/lib/converter.js:32:9)
at /home/mabs/project/LYT3/nativescript/node_modules/nativescript-dev-sass/lib/converter.js:41:13
at /home/mabs/project/LYT3/nativescript/node_modules/nativescript-dev-sass/lib/converter.js:76:9
at /home/mabs/.nvm/versions/node/v6.5.0/lib/node_modules/nativescript/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:99:16
at /home/mabs/.nvm/versions/node/v6.5.0/lib/node_modules/nativescript/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:123:15)
The problem is that the var output in nativescript-dev-sass/lib/converter.js:32 is undefined, but you only check for null
I've made a temporary fix in our end, by adding dummy css to all the files. (our setup doesn't allow removal of the files)
The text was updated successfully, but these errors were encountered:
m-abs
changed the title
bug: Throughs an error when scss-file is empty
bug: Throws an error if scss-file is empty
Oct 7, 2016
This is exactly the problem that I encountered over the past 3 days (I'm new to NativeScript). The error is very cryptic and led to a couple of hours of adding & remove folders & files trying to identify the issue.
Like @m-abs suggested, even something as simple as placing a random comment at the top of the .scss / .sass file solves this problem:
/* comment */
I'm sure a lot of newcomers to NativeScript (especially those coming from the web with heavy usage of Sass) are going to run across this issue...
We have a number of empty files in our project and we got this error when we tried to move to
sass
The problem is that the var
output
innativescript-dev-sass/lib/converter.js:32
is undefined, but you only check fornull
I've made a temporary fix in our end, by adding dummy css to all the files. (our setup doesn't allow removal of the files)
The text was updated successfully, but these errors were encountered: