I am just getting started with nodejs. Currently I am stuck in a problem where I am trying to install "exceljs" library in my system. I am working on corporate laptop and I tried in vain installing "npm install exceljs" on my system, because this laptop is behind proxy wall and its failing miserably to allow me to install anything.
I am still under process of achieving proxy details from IT support but it will take some time, meanwhile, i tried installing a local copy of this library from Github but ran in several problems.
Here is code that i am trying to run:
var Excel = require("C:/Users/itsme/project_folder_imp/src/exceljs-master/excel.js");
var workbook = new Excel.Workbook();
workbook.xlsx.readFile('file.xlsx')
.then(function() {
var worksheet = workbook.getWorksheet('sheet');
var i=1;
worksheet.eachRow({ includeEmpty: false }, function(row, rowNumber) {
r=worksheet.getRow(i).values;
r1=r[2];
console.log(r1);
i++;
});
worksheet.getCell('B3').value = "abc";
return workbook.xlsx.writeFile('file.xlsx')
});
When i try to run it from cmd using node helloexcel.js
it throws below error:
I am still running around circles of this error ./dist5/es5
and have no idea whatsoever what is this as I cannot even find it in exceljs library folder which i downloaded from github.
What I tried:
1). I tried all the ways to npm install packages in my system, but still no luck due to proxy problems
2). for ./dist5/es5
i tried reading here but I am not able to follow whats written there
It will be really helpful to get this error resolved as i simply cannot proceed and have already wasted lots of time behind this.
EDIT: I have solved my problem recently and it was all happening because I was not able to do "npm install exceljs" due to proxy problem. I followed a link to the post where it was mentioned to install Fiddler and after some easy configurations in .npmrc file it worked. I have also included a link to that same post which finally helped me to resolve proxy block in the company. please refer to my comment below.