Closed mrhso closed 5 years ago
works for me?
Filenames are case-sensitive on Linux.
>` const { distance, wgs_gcj, gcj_wgs, gcj_bd, bd_gcj, wgs_bd, bd_wgs, __bored__, gcj_wgs_bored, bd_gcj_bored, bd_wgs_bored } = require('prcoords');
Thrown:
Error: Cannot find module '/data/data/com.termux/files/usr/lib/node_modules/prcoords/js/PRcoords.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:228:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:365:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:27)
at Function.Module._load (internal/modules/cjs/loader.js:527:27)
at Module.require (internal/modules/cjs/loader.js:681:19)
at require (internal/modules/cjs/helpers.js:16:16) {
code: 'MODULE_NOT_FOUND',
path: '/data/data/com.termux/files/usr/lib/node_modules/prcoords/package.json',
requestPath: 'prcoords'
}
do you mind showing me what find /data/data/com.termux/files/usr/lib/node_modules/prcoords
returns? because npm remove -g prcoords; npm install -g prcoords
and doing the require really works on my end
$ find /data/data/com.termux/files/usr/lib/node_modules/prcoords
/data/data/com.termux/files/usr/lib/node_modules/prcoords
/data/data/com.termux/files/usr/lib/node_modules/prcoords/package.json
/data/data/com.termux/files/usr/lib/node_modules/prcoords/LICENSE.gplv3
/data/data/com.termux/files/usr/lib/node_modules/prcoords/README.md
/data/data/com.termux/files/usr/lib/node_modules/prcoords/js
/data/data/com.termux/files/usr/lib/node_modules/prcoords/js/PRCoords.js
If I replace "main": "js/PRcoords.js",
with "main": "js/PRCoords.js",
, it will work.
https://github.com/Artoria2e5/PRCoords/blob/master/package.json#L5