Giter Club home page Giter Club logo

Comments (3)

dbit-xia avatar dbit-xia commented on August 15, 2024

Attempt to execute the npm command or add a dependency

npm install unit-http 

from unit.

stacy-rendall avatar stacy-rendall commented on August 15, 2024

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:

  1. without linking at all:
    1. take back app ownership as user
    2. remove global unit-http install: sudo npm -g uninstall unit-http
    3. rm -rf node_modules package-lock.json
    4. npm install express unit-http
    5. chown app unit:unit
    6. apply config
  2. global install, local install, no link:
    1. redo sudo npm install -g --unsafe-perm unit-http
    2. take back app ownership as user
    3. rm -rf node_modules package-lock.json
    4. npm install express unit-http
    5. chown app unit:unit
    6. apply config
  3. global install, local install, then link:
    1. with unit-http still available as global dependency
    2. take back app ownership as user
    3. rm -rf node_modules package-lock.json
    4. npm install express unit-http
    5. sudo npm link unit-http
    6. chown app unit:unit
    7. apply config
  4. global install, link, then local install:
    1. with unit-http still available as global dependency
    2. take back app ownership as user
    3. sudo npm link unit-http
    4. npm install express unit-http
    5. chown app unit:unit
    6. apply config

from unit.

dbit-xia avatar dbit-xia commented on August 15, 2024

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')'

from unit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.