Module did not self-register
alexandrmiee opened this issue · 0 comments
alexandrmiee commented
Error when try to register module
package.json
"@nestjs/platform-fastify": "^7.6.7",
"fastify-cookie": "^5.1.0",
"fastify-csrf": "^3.0.1",
main.ts
import { fastifyCookie } from 'fastify-cookie';
import fastifyCsrf from 'fastify-csrf';
const server = fastify();
await server.register(fastifyCookie);
await server.register(fastifyCsrf, { cookieOpts: { signed: true } });
error
Error: Module did not self-register: '\\?\...\node_modules\libxmljs\build\Release\xmljs.node'.
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1065:18)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at bindings (...\node_modules\bindings\bindings.js:84:48)
at Object.<anonymous> (...\node_modules\libxmljs\lib\bindings.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)