BrowserFS icon indicating copy to clipboard operation
BrowserFS copied to clipboard

Error at ApiError

Open denyncrawford opened this issue 7 years ago • 2 comments

Hi! I was doing a test on a basic Node/express app just to see how it works and instantly it threw me an error:

C:\folder\to\app\index.js:12 throw e; ^ Error at new ApiError (C:\folder\to\app\node_modules\browserfs\dist\browserfs.js:5430:22) at finish (C:\folder\to\app\node_modules\browserfs\dist\browserfs.js:20369:20) at getFileSystem (C:\folder\to\app\node_modules\browserfs\dist\browserfs.js:20405:9) at Object.configure (C:\folder\to\app\node_modules\browserfs\dist\browserfs.js:20341:5) at Object.<anonymous> (C:\folder\to\app\index.js:5:11) at Module._compile (internal/modules/cjs/loader.js:722:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3)

I'm missconfigurating something, maybe? This is my app:

var Dropbox = require('dropbox').Dropbox;
var fetch = require('isomorphic-fetch');
var client = new Dropbox({ accessToken: 'CensoredAccesKeyADSFsGagSG52FdGd', fetch:fetch});
var BrowserFS = require('browserfs');
BrowserFS.configure({
	fs: "DropboxV2",
	options: {
		client: client
	}
}, function(e) {
	if (e) {
		throw e;
	}
});
var fs = BrowserFS.BFSRequire('fs');
const express = require(express);
const app = express();

app.get("/", function(req, res){
	res.send("Hi! Not even using BrowserFS")
});

app.listen(3000);

denyncrawford avatar Jan 04 '19 19:01 denyncrawford

Hey there! Can you console.log the error and show me what it contains? As-is, I can't tell what the problem is.

jvilk avatar May 29 '19 02:05 jvilk

Closing (stale). If you would like to reopen this issue, please do so by creating a new issue in the relevant repositories of @browser-fs

james-pre avatar Oct 25 '23 00:10 james-pre