Skip to content

Problems with running the application (deque, npm-rebuild.js) #43

@fracz

Description

@fracz

I have meteor 3.1.2 application and am trying to run it with your container. I cannot run, though with the following error.

myapp        | Now using node v22.13.1 (npm v10.9.2)
myapp        | default -> 22.13.1 (-> v22.13.1 *)
myapp        | => Installing npm dependencies
myapp        | npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
myapp        | npm warn deprecated gauge@3.0.2: This package is no longer supported.
myapp        | npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
myapp        | npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
myapp        | npm warn deprecated npmlog@5.0.1: This package is no longer supported.
myapp        | npm warn deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
myapp        | npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
myapp        | 
myapp        | > install
myapp        | > node npm-rebuild.js
myapp        | 
myapp        | node:events:502
myapp        |       throw er; // Unhandled 'error' event
myapp        |       ^
myapp        | 
myapp        | Error: spawn npm ENOENT
myapp        |     at ChildProcess._handle.onexit (node:internal/child_process:285:19)
myapp        |     at onErrorNT (node:internal/child_process:483:16)
myapp        |     at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
myapp        | Emitted 'error' event on ChildProcess instance at:
myapp        |     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
myapp        |     at onErrorNT (node:internal/child_process:483:16)
myapp        |     at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
myapp        |   errno: -2,
myapp        |   code: 'ENOENT',
myapp        |   syscall: 'spawn npm',
myapp        |   path: 'npm',
myapp        |   spawnargs: [ 'rebuild', '--update-binary' ]
myapp        | }

I then inspected the sources of the application and foud out that I can skip the rebuiling NPM with METEOR_SKIP_NPM_REBUILD env variable. I gave it a shot, and then process wend further, but crashed with the following:

myapp        | found 0 vulnerabilities
myapp        | => Starting meteor app on port 80
myapp        | error on boot.js Error: Cannot find module 'denque'
myapp        | Require stack:
myapp        | - /bundle/bundle/programs/server/boot.js
myapp        | - /bundle/bundle/main.js
myapp        |     at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
myapp        |     at Function.resolve (node:internal/modules/helpers:146:19)
myapp        |     at Object.require (/tools/static-assets/server/boot.js:295:34)
myapp        |     at packages/meteor.js:1003:50
myapp        |     at packages/meteor.js:1017:4
myapp        |     at processNext (packages/core-runtime.js:127:30)
myapp        |     at Object.queue (packages/core-runtime.js:111:3)
myapp        |     at packages/meteor.js:1:47
myapp        |     at /tools/static-assets/server/boot.js:432:36
myapp        |     at /tools/static-assets/server/boot.js:503:13 {
myapp        |   code: 'MODULE_NOT_FOUND',
myapp        |   requireStack: [
myapp        |     '/bundle/bundle/programs/server/boot.js',
myapp        |     '/bundle/bundle/main.js'
myapp        |   ]
myapp        | }
myapp        | Error: Cannot find module 'denque'
myapp        | Require stack:
myapp        | - /bundle/bundle/programs/server/boot.js
myapp        | - /bundle/bundle/main.js
myapp        |     at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
myapp        |     at Function.resolve (node:internal/modules/helpers:146:19)
myapp        |     at Object.require (/tools/static-assets/server/boot.js:295:34)
myapp        |     at packages/meteor.js:1003:50
myapp        |     at packages/meteor.js:1017:4
myapp        |     at processNext (packages/core-runtime.js:127:30)
myapp        |     at Object.queue (packages/core-runtime.js:111:3)
myapp        |     at packages/meteor.js:1:47
myapp        |     at /tools/static-assets/server/boot.js:432:36
myapp        |     at /tools/static-assets/server/boot.js:503:13
myapp exited with code 1

I tried to replicate this issue with a fresh tutorial app, but it seems to be working there. I have no idea where to look for a problem in my application. Maybe you can give me a hint what might be the problem?

I am building te app with meteor build --server-only and using the Dockerfile method from the readme, i.e. copying the tarball to the container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions