node: '12.16.2',
v8: '7.8.279.23-node.34',
uv: '1.34.2',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.15.0',
modules: '72',
nghttp2: '1.40.0',
napi: '5',
llhttp: '2.0.4',
http_parser: '2.9.3',
openssl: '1.1.1e',
cldr: '36.0',
icu: '65.1',
tz: '2019c',
unicode: '12.1'
- npm node-sass versions (`[email protected]`):
here is a link to my repo **https://github.com/umakanth-pendyala/Portfolio.git**
And please do specify any other libraries I can use instead of node-sass and if possible provide the documentation links for them.
I have updated the render.js file as you mentioned earlier
```
/*!
* node-sass: lib/render.js
*/
var chalk = require('chalk'),
fs = require('fs'),
mkdirp = require('mkdirp'),
path = require('path'),
sass = require('./');
/**
* Render
*
* @param {Object} options
* @param {Object} emitter
* @api public
*/
module.exports = function(options, emitter) {
var renderOptions = {
includePaths: options.includePath,
omitSourceMapUrl: options.omitSourceMapUrl,
indentedSyntax: options.indentedSyntax,
outFile: options.dest,
outputStyle: options.outputStyle,
precision: options.precision,
sourceComments: options.sourceComments,
sourceMapEmbed: options.sourceMapEmbed,
sourceMapContents: options.sourceMapContents,
sourceMap: options.sourceMap,
sourceMapRoot: options.sourceMapRoot,
importer: options.importer,
functions: options.functions,
indentWidth: options.indentWidth,
indentType: options.indentType,
linefeed: options.linefeed
};
if (options.data) {
renderOptions.data = options.data;
} else if (options.src) {
renderOptions.file = options.src;
}
var retries = 0;
var sourceMap = options.sourceMap;
var destination = options.dest;
var stdin = options.stdin;
var success = function(result) {
retries = 0;
var todo = 1;
var done = function() {
if (--todo <= 0) {
emitter.emit('done');
}
};
if (!destination || stdin) {
emitter.emit('log', result.css.toString());
if (sourceMap && !options.sourceMapEmbed) {
emitter.emit('log', result.map.toString());
}
return done();
}
emitter.emit('info', chalk.green('Rendering Complete, saving .css file...'));
mkdirp(path.dirname(destination), function(err) {
if (err) {
return emitter.emit('error', chalk.red(err));
}
fs.writeFile(destination, result.css.toString(), function(err) {
if (err) {
return emitter.emit('error', chalk.red(err));
}
emitter.emit('info', chalk.green('Wrote CSS to ' + destination));
emitter.emit('write', err, destination, result.css.toString());
done();
});
});
if (sourceMap) {
todo++;
mkdirp(path.dirname(sourceMap), function(err) {
if (err) {
return emitter.emit('error', chalk.red(err));
}
fs.writeFile(sourceMap, result.map, function(err) {
if (err) {
return emitter.emit('error', chalk.red('Error' + err));
}
emitter.emit('info', chalk.green('Wrote Source Map to ' + sourceMap));
emitter.emit('write-source-map', err, sourceMap, result.map);
done();
});
});
}
emitter.emit('render', result.css.toString());
};
var error = function(error) {
// emitter.emit('error', chalk.red(JSON.stringify(error, null, 2)));
// code added here *********************
if (isFileUnreadable(error) && retries < 1000) {
retries++;
sass.render(renderOptions, renderCallback);
}
else {
emitter.emit('error', chalk.red(JSON.stringify(error, null, 2)));
}
};
var isFileUnreadable = function(error) {
var unreadable = typeof error.message === 'string' &&
(
error.message.startsWith('File to read not found or unreadable: ') ||
error.message.startsWith('File to import not found or unreadable: ')
);
if (unreadable) {
var file = error.message.split('not found or unreadable: ')[1].trim();
return fs.existsSync(file);
}
return false;
// ************************************
};
var renderCallback = function(err, result) {
if (err) {
error(err);
}
else {
success(result);
}
};
sass.render(renderOptions, renderCallback);
};
```
Still getting this error when I save the file
```
{
"status": 3,
"message": "Internal Error: File to read not found or unreadable: D:/WEB Deveble: D:/WEB Deve Html and css practice/My Portfolio/scss/main.scember",
"formatted": "Internal Error: File to read not found or unreadable: D:/WEB Deveble: D:/WEB Deve Html and css practice/My Portfolio/scss/main.soli\n"
}
```
`