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 when starting / decamelize/index.js:9 SyntaxError: Invalid regular expression: / Invalid escape #6

Closed
Eisteed opened this issue Oct 6, 2021 · 5 comments

Comments

@Eisteed
Copy link

Eisteed commented Oct 6, 2021

Hi, Thank you for sharing such a good project source,
I'm trying to run aggr-server to access data locally, I'm using a fresh ubuntu server 18.04 LTS
Installed nodejs and npm, no issues when running npm build but when I try to run node index I'm getting this error :

using config file config.json
/home/test/aggr-server/node_modules/decamelize/index.js:9
                .replace(/([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/gu, `$1${separator}$2`)
                 ^

SyntaxError: Invalid regular expression: /([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/: Invalid escape
    at module.exports (/home/test/aggr-server/node_modules/decamelize/index.js:9:4)
    at Object.keys.forEach (/home/test/aggr-server/src/config.js:244:23)
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/home/test/aggr-server/src/config.js:243:21)
    at Module._compile (module.js:652:30)
    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)

I can't find much help about this error on the google so if you know what I'm doing wrong thanks in advance. 👍

@Tucsky
Copy link
Owner

Tucsky commented Oct 6, 2021

What command did you run exactly? And what version of node are you using?

@Eisteed
Copy link
Author

Eisteed commented Oct 6, 2021

node v8.10.0
npm 3.5.2

The error output comes from the command
node index

@Tucsky
Copy link
Owner

Tucsky commented Oct 6, 2021

Node v8 is outdated af, that's like 4 years old now 😃
It will work with node v14 or +

@Eisteed
Copy link
Author

Eisteed commented Oct 6, 2021

Alright that version comes up when installing with apt-get install, I'm a bit newbie to nodejs I guess this comes from ubuntu 18.04 repo, thanks for the information.

@Eisteed
Copy link
Author

Eisteed commented Oct 6, 2021

Everything runs fine with 14.18.0 installed with NVM, thanks !

@Tucsky Tucsky closed this as completed Oct 22, 2021
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

2 participants