neonious / lowjs

A port of Node.JS with far lower system requirements. Community version for POSIX systems such as Linux, uClinux or Mac OS X.
http://www.lowjs.org/
Other
1.27k stars 72 forks source link

require json is not working #114

Closed algj closed 4 years ago

algj commented 4 years ago

Example from avj node module:

var metaSchema = require('./refs/json-schema-draft-07.json');
TypeError: cannot resolve module './refs/json-schema-draft-07.json', parent '..../node_modules/ajv/lib/definition_schema.js'

Make it possible to require json files.

ThomasRogg commented 4 years ago

low.js should support requiring JSON files. I will try myself next weekend and report!

ThomasRogg commented 4 years ago

Requiring JSON files works perfectly. I guess the problem is the "..../" instead of a "../../", so the resolving has some kind of bug. Do you have an example project or steps to do to trigger such an error?

algj commented 4 years ago

Sorry, forgot to mention the "...." was to hide full path or whatever was it. It's shouldn't be a problem now. Thanks!