yortus/DBFFile

Problem with Node.js version 11

Closed this issue · 2 comments

@yortus
when try to add this to project, it throws an error

import { DBFFile } from 'dbffile';

import { DBFFile } from 'dbffile';
^

SyntaxError: Unexpected token {
at new Script (vm.js:85:7)
at createScript (vm.js:266:10)
at Object.runInThisContext (vm.js:314:10)
at Module._compile (internal/modules/cjs/loader.js:698:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)
at Module.require (internal/modules/cjs/loader.js:667:17)
at require (internal/modules/cjs/helpers.js:20:18)
[nodemon] app crashed - waiting for file changes before starting...

That's ES module syntax, which Node 11 doesn't support, hence the syntax error. Try:

const {DBFFile} = require('dbffile');

@amirzandi let me know if you still have an issue. Closing for now.