My Technical Notes

Sunday, 15 January 2017

Compiling Bootstrap 4 on Windows Issue

When compiling Bootstrap 4 on Windows using the following command:


grunt dist

You can potentially get the following error message:


>> fs.js:951
>>   return binding.readdir(pathModule._makeLong(path), options.encoding);
>>                  ^
>> 
>> Error: ENOENT: no such file or directory, scandir 'C:\_code\bootstrap-4.0.0-alpha.6\node_modules\node-sass\vendor'
>>     at Error (native)
>>     at Object.fs.readdirSync (fs.js:951:18)
>>     at Object.getInstalledBinaries (C:\_code\bootstrap-4.0.0-alpha.6\node_modules\node-sass\lib\extensions.js:122:13)
>>     at foundBinariesList (C:\_code\bootstrap-4.0.0-alpha.6\node_modules\node-sass\lib\errors.js:20:15)
>>     at foundBinaries (C:\_code\bootstrap-4.0.0-alpha.6\node_modules\node-sass\lib\errors.js:15:5)
>>     at Object.module.exports.missingBinary (C:\_code\bootstrap-4.0.0-alpha.6\node_modules\node-sass\lib\errors.js:45:5)
>>     at module.exports (C:\_code\bootstrap-4.0.0-alpha.6\node_modules\node-sass\lib\binding.js:15:30)
>>     at Object.<anonymous> (C:\_code\bootstrap-4.0.0-alpha.6\node_modules\node-sass\lib\index.js:14:35)
>>     at Module._compile (module.js:570:32)
>>     at Object.Module._extensions..js (module.js:579:10)

You can fix the issue using:


npm rebuild node-sass

No comments: