Closed algj closed 3 years ago
OK. But what exactly is wrong with low.js regarding this? Where is the bug?
OK. But what exactly is wrong with low.js regarding this? Where is the bug?
Low.js does not read package.json, that means it won't work on some packages which doesn't have "index.js". Well, people could manually write index.js files to route it to correct location/file but this is a hacky solution.
It does read package.json, see src/low_module.cpp. Do you have an exact example where this does not work?
Some node modules have in package.json "main" parameter which basically says which script to execute.
For example, people often put the entry point to lib/index.js or lib/.js, in this case the corresponding script must be described as main in package.json.
Example of package.json:
About it more: https://stackoverflow.com/questions/22512992/node-js-package-json-main-parameter