ENVIRONMENT: windows 10
@web3-storage/w3up-client: "12.0.0",
node: v18.16.0
npm : 9.8.1
My app was running for about one year on previous version of web3storage on nodejs, now I have updated my app but got this error:
{
"errorType": "Error",
"errorMessage": "require() of ES Module /var/task/node_modules/@web3-storage/w3up-client/dist/src/index.node.js from /var/task/ipfs.js not supported.\nInstead change the require of index.node.js in /var/task/ipfs.js to a dynamic import() which is available in all CommonJS modules.",
"trace": [
"Error [ERR_REQUIRE_ESM]: require() of ES Module /var/task/node_modules/@web3-storage/w3up-client/dist/src/index.node.js from /var/task/ipfs.js not supported.",
"Instead change the require of index.node.js in /var/task/ipfs.js to a dynamic import() which is available in all CommonJS modules.",
" at Object. (/var/task/ipfs.js:31:31)",
" at Object. (/var/task/paymentJob.js:27:27)",
" at Object. (/var/task/index.js:5:22)",
" at _tryRequireFile (file:///var/runtime/index.mjs:1002:37)",
" at _tryRequire (file:///var/runtime/index.mjs:1052:25)",
" at _loadUserApp (file:///var/runtime/index.mjs:1081:22)",
" at UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:27)",
" at start (file:///var/runtime/index.mjs:1282:42)",
" at file:///var/runtime/index.mjs:1288:7"
]
}
ENVIRONMENT: windows 10 @web3-storage/w3up-client: "12.0.0", node: v18.16.0 npm : 9.8.1
My app was running for about one year on previous version of web3storage on nodejs, now I have updated my app but got this error:
{ "errorType": "Error", "errorMessage": "require() of ES Module /var/task/node_modules/@web3-storage/w3up-client/dist/src/index.node.js from /var/task/ipfs.js not supported.\nInstead change the require of index.node.js in /var/task/ipfs.js to a dynamic import() which is available in all CommonJS modules.", "trace": [ "Error [ERR_REQUIRE_ESM]: require() of ES Module /var/task/node_modules/@web3-storage/w3up-client/dist/src/index.node.js from /var/task/ipfs.js not supported.", "Instead change the require of index.node.js in /var/task/ipfs.js to a dynamic import() which is available in all CommonJS modules.", " at Object. (/var/task/ipfs.js:31:31)",
" at Object. (/var/task/paymentJob.js:27:27)",
" at Object. (/var/task/index.js:5:22)",
" at _tryRequireFile (file:///var/runtime/index.mjs:1002:37)",
" at _tryRequire (file:///var/runtime/index.mjs:1052:25)",
" at _loadUserApp (file:///var/runtime/index.mjs:1081:22)",
" at UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1119:27)",
" at start (file:///var/runtime/index.mjs:1282:42)",
" at file:///var/runtime/index.mjs:1288:7"
]
}