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

web-tree-sitter not found when run ./scripts/ninja.js build #5665

Closed
aspeddro opened this issue Sep 17, 2022 · 1 comment · Fixed by #5666
Closed

web-tree-sitter not found when run ./scripts/ninja.js build #5665

aspeddro opened this issue Sep 17, 2022 · 1 comment · Fixed by #5666

Comments

@aspeddro
Copy link
Contributor

I'm trying to build the compiler locally. I did all the steps described in CONTRIBUTING.md

Node: v16.15.1

./scripts/ninja.js build
rescript: [1/1008] core/js_fold.ml
FAILED: core/js_fold.ml
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'web-tree-sitter'
Require stack:
- /home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js:2:9)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js'
  ]
}
rescript: [2/1008] core/js_record_map.ml
FAILED: core/js_record_map.ml
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'web-tree-sitter'
Require stack:
- /home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js:2:9)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js'
  ]
}
rescript: [3/1008] core/js_record_iter.ml
FAILED: core/js_record_iter.ml
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'web-tree-sitter'
Require stack:
- /home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js:2:9)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js'
  ]
}
rescript: [4/1008] core/js_record_fold.ml
FAILED: core/js_record_fold.ml
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'web-tree-sitter'
Require stack:
- /home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js:2:9)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/pedro/Desktop/projects/rescript-compiler/ocaml-tree/wasm.js'
  ]
}
FAILED: cannot make progress due to previous errors.
Command failed: /home/pedro/Desktop/projects/rescript-compiler/linux/ninja.exe native all
please run "./scripts/ninja.js config" first
@cristianoc
Copy link
Collaborator

cristianoc commented Sep 17, 2022

Long story (the whole tree sitter step should just be removed at some point).
For now, try:

touch jscomp/core/*

and build again.
That would essentially prevent that step from running.

cristianoc added a commit that referenced this issue Sep 17, 2022
Has been give lots of compilation errors, but no upside.

Fixes #5665
cristianoc added a commit that referenced this issue Sep 17, 2022
Has been give lots of compilation errors, but no upside.

Fixes #5665
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 a pull request may close this issue.

2 participants