Skip to content
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

Exported packages do not work after install #61

Open
rubensworks opened this issue Jan 7, 2021 · 0 comments
Open

Exported packages do not work after install #61

rubensworks opened this issue Jan 7, 2021 · 0 comments
Labels
bug Something isn't working priority:high

Comments

@rubensworks
Copy link
Member

  • Import default Comunica SPARQL
  • Export it as zip without making any changes
  • Unzip
  • Install the package using npm install
  • Run node bin/query.js produces the following error:
(node:18413) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/rtaelman/Downloads/engine/bin/query.js:2
import {runArgsInProcessStatic} from "@comunica/runner-cli";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1117:16)
    at Module._compile (internal/modules/cjs/loader.js:1165:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47

I suspect this is because the files inside bin are .js files, while they should be .ts files.
We should have a test to confirm this always works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:high
Projects
None yet
Development

No branches or pull requests

1 participant