-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
gl-stype-spec is not working #400
Comments
Thanks for the feedback. Does |
@wipfli v14.0.0 also does not work. But it is different error. npm install @maplibre/[email protected] --global
gl-style-composite
internal/fs/utils.js:626
throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
at Object.openSync (fs.js:490:10)
at Object.readFileSync (fs.js:394:35)
at Object.<anonymous> (/Users/j_igarashi/.nvm/versions/node/v14.17.0/lib/node_modules/@maplibre/maplibre-gl-style-spec/bin/gl-style-composite:9:44)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'ERR_INVALID_ARG_TYPE'
} However, |
Thanks for opening this issue. The command line tools have a bit a strange way to tell you if your input is wrong. In particular, if you don't provide a path to a style file then you get this ugly file system error Locally for me all commands work if I provide a style file in version 14.0.0: nvm use 14
npm install @maplibre/[email protected] --global
gl-style-composite style.json
gl-style-format style.json
gl-style-validate style.json However, with nvm use 14
npm install @maplibre/[email protected] --global
gl-style-composite style.json
internal/modules/cjs/loader.js:328
throw err;
^
Error: Cannot find module '/home/wipfli/.nvm/versions/node/v14.17.6/lib/node_modules/@maplibre/maplibre-gl-style-spec/dist/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:320:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:533:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:875:27)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/home/wipfli/.nvm/versions/node/v14.17.6/lib/node_modules/@maplibre/maplibre-gl-style-spec/bin/gl-style-composite:6:14)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32) {
code: 'MODULE_NOT_FOUND',
path: '/home/wipfli/.nvm/versions/node/v14.17.6/lib/node_modules/@maplibre/maplibre-gl-style-spec/package.json',
requestPath: '../' So for now I suggest you use version |
Should be fixed now, I published |
@wipfli Thank you for fixing this issue quickly! I close this issue now. |
maplibre-gl-js version: @maplibre/maplibre-gl-style-spec v14.0.1
https://www.npmjs.com/package/@maplibre/maplibre-gl-style-spec
browser:
Steps to Trigger Behavior
maplibre-gl-style-spec
globallygl-style-spec
CLI tools.Link to Demonstration
https://jsbin.com/
Expected Behavior
all CLI tools should work after installing the package.
Actual Behavior
When I execute CLI tool of
gl-style-spec
, it will occur the following error due to nomain
entry inpackage.json
The text was updated successfully, but these errors were encountered: