Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with library syntax #131

Open
jamesxsc opened this issue Dec 12, 2022 · 0 comments
Open

Error with library syntax #131

jamesxsc opened this issue Dec 12, 2022 · 0 comments

Comments

@jamesxsc
Copy link

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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant