Closed dixitt5 closed 1 year ago
You cannot use the JsonDatabase
(from package brackets-json-db
) in the browser. This is only supported on Node.js, since it reads the filesystem.
For the browser, you should either have a backend which returns the data for you, or if you want to stay in the browser, you can use brackets-memory-db
.
This could be named better, I agree... 😕
Hey guys, hope you're doing well. I'm trying to implement brackets by using React, somehow getting this error. I will be thankful to you guys if you help me with this. (I'm stuck on this issue for so long) here's the error I'm getting:
./node_modules/brackets-json-db/dist/index.js 12:10 Module parse failed: Unexpected token (12:10)
File was processed with these loaders:
./node_modules/react-scripts/node_modules/babel-loader/lib/index.js You may need an additional loader to handle the result of these loaders. | const clone = rfdc(); | class JsonDatabase { -> internal; | /* | Creates an instance of JsonDatabase, an implementation of CrudInterface for a json file.