Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Matomo
  3. Performance Audit Matomo plugin activation fails with NPM & NodeJS errors

Performance Audit Matomo plugin activation fails with NPM & NodeJS errors

Scheduled Pinned Locked Moved Matomo
5 Posts 3 Posters 379 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote on last edited by
    #1

    I am trying to install the PerformanceAudit plugin with Matomo and upon activating it fails with the following error output in the webpage:

    PerformanceAudit plugin activation failed due to the following error: Node.js dependency installation failed due to the following error: NPM has the following unexpected output: npm WARN config only Use `--omit=dev` to omit dev dependencies from the install.npm WARN using --force Recommended protections disabled.npm WARN logfile Error: ENOENT: no such file or directory, scandir '/var/www/.npm/_logs'npm WARN logfile at async Object.readdir (node:internal/fs/promises:945:18)npm WARN logfile at async #cleanLogs (/usr/local/node-20.13.1/lib/node_modules/npm/lib/utils/log-file.js:207:19)npm WARN logfile error cleaning log files Error: ENOENT: no such file or directory, scandir '/var/www/.npm/_logs'npm WARN logfile at async Object.readdir (node:internal/fs/promises:945:18)npm WARN logfile at async #cleanLogs (/usr/local/node-20.13.1/lib/node_modules/npm/lib/utils/log-file.js:207:19) {npm WARN logfile errno: -2,npm WARN logfile code: 'ENOENT',npm WARN logfile syscall: 'scandir',npm WARN logfile path: '/var/www/.npm/_logs'npm WARN logfile }npm notice npm notice New minor version of npm available! 10.5.2 -> 10.9.2npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.9.2>npm notice Run `npm install -g npm@10.9.2` to update!npm notice npm ERR! code ENOENTnpm ERR! syscall mkdirnpm ERR! path /var/www/.npmnpm ERR! errno -2npm ERR! enoent ENOENT: no such file or directory, mkdir '/var/www/.npm'npm ERR! enoent This is related to npm not being able to find a file.npm ERR! enoent npm ERR! Log files were not written due to an error writing to the directory: /var/www/.npm/_logsnpm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
    

    And then when returning to Matomo, it shows these two errors in alert style divs:

    ERROR: /app/data/plugins/PerformanceAudit/NodeDependencyInstaller.php(147): NPM has the following unexpected output: npm WARN config only Use `--omit=dev` to omit dev dependencies from the install. npm WARN using --force Recommended protections disabled. npm WARN logfile Error: ENOENT: no such file or directory, scandir '/var/www/.npm/_logs' npm WARN logfile at async Object.readdir (node:internal/fs/promises:945:18) npm WARN logfile at async #cleanLogs (/usr/local/node-20.13.1/lib/node_modules/npm/lib/uti (Module: CorePluginsAdmin, Action: activate, In CLI mode: false)
    
    ERROR: /app/data/plugins/PerformanceAudit/NodeDependencyInstaller.php(41): Node.js dependency installation failed due to the following error: NPM has the following unexpected output: npm WARN config only Use `--omit=dev` to omit dev dependencies from the install. npm WARN using --force Recommended protections disabled. npm WARN logfile Error: ENOENT: no such file or directory, scandir '/var/www/.npm/_logs' npm WARN logfile at async Object.readdir (node:internal/fs/promises:945:18) npm WARN logfile at asy (Module: CorePluginsAdmin, Action: activate, In CLI mode: false)
    

    Is this reproducible for anyone else? Is this possible to install with the way Cloudron runs the Matomo package or do we need to make image adjustments?

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Kinda strange that it wants to run npm here in the first place. Matomo is a php app, so presumably the plugins would not require node modules unless they are basically built from source (including web dependency downloading) on the server.

      The main issue is, that npm wants to write log files into read-only locations. Is this specific to that one plugin or a generic pattern? Also you could maybe try to build the plugin locally and then upload it to matomo?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        joseph
        Staff
        wrote on last edited by
        #3

        Plugin needs npm - https://github.com/DevDavido/performance-audit-plugin/issues/54 . Even runs chrome headless under the hook per the latest comment there. I think one has to make a custom package to run this.

        1 Reply Last reply
        1
        • d19dotcaD Offline
          d19dotcaD Offline
          d19dotca
          wrote on last edited by
          #4

          Ah I guess that’s why, it’s running chrome for the lighthouse metrics I guess.

          Is there a way we can allow this type of plugin in Matomo or is it simply not going to be compatible due to the way it’s packaged?

          --
          Dustin Dauncey
          www.d19.ca

          1 Reply Last reply
          0
          • J Offline
            J Offline
            joseph
            Staff
            wrote on last edited by
            #5

            I think unless the package is modified heavily, it's not going to work .

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search