Closed monteiz closed 1 year ago
If I run the server with babel-node, the execution goes fine:
% NODE_ENV=development nodemon --inspect=50002 --watch src --exec node_modules/.bin/babel-node src/server.js
[nodemon] 2.0.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): src/**/*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node_modules/.bin/babel-node --inspect=50002 src/server.js`
Debugger listening on ws://127.0.0.1:50002/f20d9cda-9b56-4d55-8a84-9ede58557e95
For help, see: https://nodejs.org/en/docs/inspector
HTTPS server running on https://localhost:4501 [development]
This module relies on a native addon. As a result, I don't think it's possible to bundle it safely. Avoid bundling.
Thank you Matteo. For other people facing the same situation, here is the webpack configuration snippet to use:
externals: {
"@fastify/secure-session": "commonjs @fastify/secure-session",
}
Prerequisites
Fastify version
4.17.0
Plugin version
6.1.0
Node.js version
18.16.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.6.5
Description
Cannot execute my server because of this error (it seems related to
sodium-native
though):I have tried to transpile and run with node
16.20.0
and14.21.3
, and also with@fastify/secure-session
5.3.0
.If I do not include
@fastify/secure-session
the app runs fine.Steps to Reproduce
I have created a repository: https://github.com/monteiz/fastify_secure_session_issue
Expected Behavior
Run without errors.