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

Which version of Node.js is needed to build eXide? #608

Closed
adamretter opened this issue Mar 19, 2023 · 2 comments · Fixed by #632
Closed

Which version of Node.js is needed to build eXide? #608

adamretter opened this issue Mar 19, 2023 · 2 comments · Fixed by #632

Comments

@adamretter
Copy link
Member

The README.md should say which version of Node.js is needed to build eXide.

I just tried with 12 - which generates warnings like:

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it

It then fails with this:

❯ npm run build

> exide@4.0.0 build /Users/aretter/code/eXide
> node scripts/build.js prepare && npm run xqlint && node scripts/build.js


> exide@4.0.0 xqlint /Users/aretter/code/eXide
> cd support/xqlint && node r.js -o build.js && cd ../..

internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module '/Users/aretter/code/eXide/support/xqlint/r.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! exide@4.0.0 xqlint: `cd support/xqlint && node r.js -o build.js && cd ../..`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the exide@4.0.0 xqlint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aretter/.npm/_logs/2023-03-19T09_50_21_142Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! exide@4.0.0 build: `node scripts/build.js prepare && npm run xqlint && node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the exide@4.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aretter/.npm/_logs/2023-03-19T09_50_21_187Z-debug.log

I then also tried with 14 which fails with the error:

Run `npm audit` for details.
❯ npm run build

> exide@4.0.0 build
> node scripts/build.js prepare && npm run xqlint && node scripts/build.js


> exide@4.0.0 xqlint
> cd support/xqlint && node r.js -o build.js && cd ../..

internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module '/Users/aretter/code/eXide/support/xqlint/r.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

I also tried with 16, which fails with a slightly different error:

❯ npm run build

> exide@4.0.0 build
> node scripts/build.js prepare && npm run xqlint && node scripts/build.js


> exide@4.0.0 xqlint
> cd support/xqlint && node r.js -o build.js && cd ../..

node:internal/modules/cjs/loader:959
  throw err;
  ^

Error: Cannot find module '/Users/aretter/code/eXide/support/xqlint/r.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

So which version of Node.js is needed to build eXide, none of versions 12, 14, or 16 work for me :-(

@joewiz
Copy link
Member

joewiz commented Mar 19, 2023

I'm able to build with the version of node installed by nvm install stable - v17.6.0.

joe@choskimac-iii eXide % nvm use stable
Now using node v17.6.0 (npm v8.5.1)
joe@choskimac-iii eXide % npm run build

> exide@4.0.0 build
> node scripts/build.js prepare && npm run xqlint && node scripts/build.js


> exide@4.0.0 xqlint
> cd support/xqlint && node r.js -o build.js && cd ../..


Tracing dependencies for: main
Uglifying file: /Users/joe/workspace/eXide/resources/scripts/xqlint.min.js

/Users/joe/workspace/eXide/resources/scripts/xqlint.min.js
----------------
/Users/joe/workspace/eXide/support/xqlint/lib/Errors.js
/Users/joe/workspace/eXide/support/xqlint/lib/StaticContext.js
/Users/joe/workspace/eXide/support/xqlint/lib/CommentParser.js
/Users/joe/workspace/eXide/support/xqlint/lib/CommentHandler.js
/Users/joe/workspace/eXide/support/xqlint/lib/Translator.js
/Users/joe/workspace/eXide/support/xqlint/lib/utils.js
/Users/joe/workspace/eXide/support/xqlint/lib/XQueryParser.js
/Users/joe/workspace/eXide/support/xqlint/lib/XQueryTokenizer.js
/Users/joe/workspace/eXide/support/xqlint/lib/XQueryLexer.js
/Users/joe/workspace/eXide/support/xqlint/lib/JSONParseTreeHandler.js
/Users/joe/workspace/eXide/support/xqlint/lib/Compiler.js
/Users/joe/workspace/eXide/support/xqlint/lib/FormatWriter.js
/Users/joe/workspace/eXide/support/xqlint/lib/visitors/CodeFormatter.js
/Users/joe/workspace/eXide/support/xqlint/lib/visitors/SemanticHighlighter.js
/Users/joe/workspace/eXide/support/xqlint/main.js

Bundling eXide source files ...

  resources/scripts/eXide.min.js      2.1mb ⚠️
  resources/scripts/eXide.min.js.map  7.0mb

⚡ Done in 256ms
Bundling jQuery plugins ...

  resources/scripts/jquery/jquery.plugins.min.js  34.6kb

⚡ Done in 16ms
Creating xar eXide-4.0.0.xar
DONE.

Agreed that the README should say what version of node is targeted, or that we'd include an .nvmrc file, or both.

@adamretter
Copy link
Member Author

This was actually caused by a bad git submodule!

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