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

fix(deps): bound web-worker to 1.2.0 #144

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Conversation

ctrlc03
Copy link
Contributor

@ctrlc03 ctrlc03 commented Jan 8, 2024

This PR bounds web-worker to a specific version, by removing the ^ symbol in the package.json file. Version 1.3.0 cause the following issue:

(node:1805) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.

/home/runner/work/ffjavascript/ffjavascript/node_modules/web-worker/node.js:17
import URL from 'url';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:[9](https://github.com/iden3/ffjavascript/actions/runs/7422450279/job/20197762249?pr=142#step:5:10)15:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:[10](https://github.com/iden3/ffjavascript/actions/runs/7422450279/job/20197762249?pr=142#step:5:11)27:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:195:29)
    at ModuleJob.run (internal/modules/esm/module_job.js:145:37)
    at async Loader.import (internal/modules/esm/loader.js:182:24)
    at async formattedImport (/home/runner/work/ffjavascript/ffjavascript/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
    at async Object.exports.requireOrImport (/home/runner/work/ffjavascript/ffjavascript/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
    at async Object.exports.loadFilesAsync (/home/runner/work/ffjavascript/ffjavascript/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
    at async singleRun (/home/runner/work/ffjavascript/ffjavascript/node_modules/mocha/lib/cli/run-helpers.js:[12](https://github.com/iden3/ffjavascript/actions/runs/7422450279/job/20197762249?pr=142#step:5:13)5:3)
    at async Object.exports.handler (/home/runner/work/ffjavascript/ffjavascript/node_modules/mocha/lib/cli/run.js:370:5)
npm ERR! Test failed.  See above for more details.

This can also be observed in this automated pr: #142 and in this issue #143

This issue is currently blocking projects dependent on ffjavascript, either directly or indirectly via snarkjs.

fix #143

@OBrezhniev OBrezhniev merged commit b65f83e into iden3:master Jan 8, 2024
13 checks passed
@ctrlc03 ctrlc03 deleted the fix/deps branch January 8, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[email protected] giving runtime errors
3 participants