You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.../clinic-node/dist/src/graphql_upload/processRequest.js:4
const fs_capacitor_1 = require("fs-capacitor");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module .../clinic-node/node_modules/.pnpm/[email protected]/node_modules/fs-capacitor/dist/index.js from .../clinic-node/dist/src/graphql_upload/processRequest.js not supported.
Instead change the require of index.js in .../clinic-node/dist/src/graphql_upload/processRequest.js to a dynamic import() which is available in all CommonJS modules.
at Object. (.../clinic-node/dist/src/graphql_upload/processRequest.js:4:24)
at Object. (.../clinic-node/dist/src/graphql_upload/graphqlUploadExpress.js:14:29)
at Object. (.../clinic-node/dist/src/main.js:5:35)
The text was updated successfully, but these errors were encountered:
Same here on my own code that doesn't even use nest js
This is just proof of the immaturity of the NodeJS ecosystem newer packages will not work with good old CommonJS
I recommend you either just copy and paste the source code and don't install via npm, or rewrite your entire codebase including nest js itself to work with esm modules.
This doesn't have to be with the code itself, it's just Node; this is why npm install isn't good.
I will just copy paste since I refuse to refactor my entire codebase.
.../clinic-node/dist/src/graphql_upload/processRequest.js:4
const fs_capacitor_1 = require("fs-capacitor");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module .../clinic-node/node_modules/.pnpm/[email protected]/node_modules/fs-capacitor/dist/index.js from .../clinic-node/dist/src/graphql_upload/processRequest.js not supported.
Instead change the require of index.js in .../clinic-node/dist/src/graphql_upload/processRequest.js to a dynamic import() which is available in all CommonJS modules.
at Object. (.../clinic-node/dist/src/graphql_upload/processRequest.js:4:24)
at Object. (.../clinic-node/dist/src/graphql_upload/graphqlUploadExpress.js:14:29)
at Object. (.../clinic-node/dist/src/main.js:5:35)
The text was updated successfully, but these errors were encountered: