CCALI / a2jviewer

This is the repo for the A2J Viewer
https://www.a2jauthor.org
Other
5 stars 8 forks source link

upgrade to node 16 #194

Closed tobiasnteireho closed 2 years ago

tobiasnteireho commented 2 years ago

node 16 is current active lts. Attempting to upgrade to 16.13.1 yields following error at steal transpilation step

Build has failed.  TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of SourceMapGenerator
    at writeFile (node:fs:2106:5)
    at /vol/data/sites/hydra.a2jauthor.org/a2jviewer-node16/node_modules/pdenodeify/lib/main.js:18:20
    at new Promise (<anonymous>)
    at /vol/data/sites/hydra.a2jauthor.org/a2jviewer-node16/node_modules/pdenodeify/lib/main.js:10:12
    at /vol/data/sites/hydra.a2jauthor.org/a2jviewer-node16/node_modules/steal-tools/lib/bundle/write_bundles.js:64:13
    at async Promise.all (index 1) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Warning: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of SourceMapGenerator Use --force to continue.

Aborted due to warnings.
tobiasnteireho commented 2 years ago

fails in node 14 as well

Build has failed.  TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of SourceMapGenerator
    at writeFile (fs.js:1491:5)
    at /vol/data/sites/hydra.a2jauthor.org/a2jviewer-node16/node_modules/pdenodeify/lib/main.js:18:20
    at new Promise (<anonymous>)
    at /vol/data/sites/hydra.a2jauthor.org/a2jviewer-node16/node_modules/pdenodeify/lib/main.js:10:12
    at /vol/data/sites/hydra.a2jauthor.org/a2jviewer-node16/node_modules/grunt-steal/node_modules/steal-tools/lib/bundle/write_bundles.js:64:13
    at async Promise.all (index 1) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Warning: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of SourceMapGenerator Use --force to continue.
mikemitchel commented 2 years ago

could be an issue with StealJS - I think it might required an upgrade to 2.x for Steal to work with Node14/16 @tobiasnteireho https://stealjs.com/docs/StealJS.topics.migrating-two.html

tobiasnteireho commented 2 years ago

This error still occurs with steal 2 and steal 2 yields a bad engine error in node 16 https://github.com/stealjs/steal-tools/issues/1161

tobiasnteireho commented 2 years ago

looks like setting sourcemaps:false in Gruntfile resolves this. Steal upgrade works.