Skip to content

Error with library syntax #131

@jamesxsc

Description

@jamesxsc

Trying to run an express server on this. Using the library node-json-db. Getting the below error on run:

Application has thrown an uncaught exception and is terminated:
C:\inetpub\ignite\node_modules\node-json-db\dist\JsonDB.js:15
    loaded = false;
           ^

SyntaxError: Unexpected token =
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\inetpub\ignite\ignite.js:1:88)

This is working fine on running normally with node. Any help much appreciated.
My imports are as below

const {JsonDB, Config} = require('node-json-db');
const express = require('express');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions