Alasql: Error: XLSX library not found

Created on 2 Dec 2016  路  13Comments  路  Source: agershun/alasql

I originally did a number of tests (6 weeks or so ago) before implementing alasql and everything seemed to work fine.

No I am getting errors, the worst of which is

Debugger listening on port 5858                                   
 error: [Error: XLSX library not found]                           
Assertion failed: (err) == (0), file src\debug-agent.cc, line 154 

Do you have a go-back build so that this can be made to work again?

! Bug

All 13 comments

Are you including the xlsx.js file?

Oh, and yes I tried npm installing alasql and xlsx. I just picked up a node alasql test file file from 2 months ago and tested it within the context of an Express app, and I am getting positive results writing an array to xlsx file. I'm trying to track down the differences now. I will work on this until I have a solution and will post results here. Thanks for your attention. Don't worry for now, I shall work on this.

Sounds great.

Please remember to share version numbers (alasql.version) also...

I had a similar issue using nodeJS. The culprit turned out to be the faulty isNode function. [email protected] - @0.3.x

@FranzSkuffka

isNode is faulty? Any inputs on how to make it better would be awesome.

Essentially, to make my build work on node v4.7.3 I shortwired the function to simply return true.
return utils.isNativeFunction(utils.global.process.reallyExit) fails on me for detecting the environment.
https://github.com/agershun/alasql/blob/develop/dist/alasql.js#L3335

I have not dug deeper so unfortunately that's all the intel I can give now.

Interesting - thank you for the input.

I just did a testrun on node 4.3.7 and got a isNode = true (see https://travis-ci.org/agershun/alasql/jobs/199440116#L424 )

Are you using a plain var alasql = require 'alasql'?

Are you using some kind of package manager? Bower? browserify? webpack? roleup? someting someting?

I am requiring alasql this inside a gulp v3.9.1 task:
var alasql = require('alasql');

If I used a bundler or frontend package manager I would not execute this from within node I guess. Just plain NPM and require.

What do you get if you do a

var alasql = require('alasql');
console.log(alasql.utils.isNode)

?

I get for alasql.utils:

...
  isNativeFunction: [Function],
  isWebWorker: false,
  isNode: false,
  isBrowser: false,
  isBrowserify: false,
  isRequireJS: false,
  isMeteor: false,
  isMeteorClient: false,
  isMeteorServer: false,
  isCordova: false,
  hasIndexedDB: false,
...
// inside utils.isNode IIFE
  console.log(utils.global.process.reallyExit)
  console.log(utils.isNativeFunction(utils.global.process.reallyExit))

// > [Function: processReallyExit]
// > false

But I suggest we don't invest any further time into this. I am afraid this is some kind of error inside the project build, modifying a global var or whatever. As long as no other dev has this problem I don't see much purpose in you fixing the legacy code I got inside a GitHub issue...

Thank you & if I can assist any further just let me know.

@technorodent Please reopen this repo when you can provide more info about your problem

I'm using rollup to bundle a lambda function and its recognized as isNode=false. Any advice on this? Cheers!

This seems to be working for now:

import alasql from 'alasql';
alasql.utils.isNode = true;
Was this page helpful?
0 / 5 - 0 ratings

Related issues

arnemorken picture arnemorken  路  6Comments

daffodilistic picture daffodilistic  路  3Comments

karubimania picture karubimania  路  6Comments

mathiasrw picture mathiasrw  路  5Comments

AmyBlankenship picture AmyBlankenship  路  6Comments