Использую классический пример для пакета excel
Файл app.js:
var xls = require('excel')
xls('Sheet.xlsx', function(err, data) {
if(err) throw err
// data is an array of arrays
})
Получаю ошибку
/mnt/c/Projects/www.m-y.ru__2/app.js:17
[0] xls('Sheet.xlsx', function(err, data) {
[0] ^
[0]
[0] TypeError: xls is not a function
[0] at Object.<anonymous> (/mnt/c/Projects/www.m-y.ru__2/app.js:17:1)
[0] at Module._compile (module.js:652:30)
[0] at Object.Module._extensions..js (module.js:663:10)
[0] at Module.load (module.js:565:32)
[0] at tryModuleLoad (module.js:505:12)
[0] at Function.Module._load (module.js:497:3)
[0] at Module.require (module.js:596:17)
[0] at require (internal/module.js:11:18)
[0] at Object.<anonymous> (/mnt/c/Projects/www.m-y.ru__2/index.js:1:75)
[0] at Module._compile (module.js:652:30)
[0] at Object.Module._extensions..js (module.js:663:10)
[0] at Module.load (module.js:565:32)
[0] at tryModuleLoad (module.js:505:12)
[0] at Function.Module._load (module.js:497:3)
[0] at Function.Module.runMain (module.js:693:10)
[0] at startup (bootstrap_node.js:191:16)
[0] at bootstrap_node.js:612:3
Подскажите пожалуйста, в чем проблема?
node -v
v8.11.4