Closed stacy-rendall closed 1 week ago
Attempt to execute the npm command or add a dependency
npm install unit-http
That executes successfully:
user@debian:~/repos/expressunit$ npm install unit-http
changed 1 package, and audited 66 packages in 985ms
12 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
package.json
{
"dependencies": {
"express": "^4.19.2",
"unit-http": "^1.32.1"
},
"name": "expressunit",
"version": "1.0.0",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": ""
}
I attempted a few different combinations on my Debian 12 OS (not the live OS as above, which ws just for a clean repro), all of which still give the same error as shown in my first post, when applying the config:
sudo npm -g uninstall unit-http
rm -rf node_modules package-lock.json
npm install express unit-http
sudo npm install -g --unsafe-perm unit-http
rm -rf node_modules package-lock.json
npm install express unit-http
rm -rf node_modules package-lock.json
npm install express unit-http
sudo npm link unit-http
sudo npm link unit-http
npm install express unit-http
Check whether the working_directory
configured in the unit is the application root directory?
Or enter the container and execute the command node -e 'require('unit-http/loader')'
I am receiving this error trying to use Unit with Node.js
To repro I've tested completely clean from scratch in a fresh Debian live image (debian-live-12.5.0-amd64-lxqt.iso) and still get the error. Steps:
unit-dev
packageOn attempting to put the config I get the following response:
And the log shows: