Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meteor 3.1 permission error on server EPERM #1369

Open
olafthiele opened this issue Dec 30, 2024 · 3 comments
Open

Meteor 3.1 permission error on server EPERM #1369

olafthiele opened this issue Dec 30, 2024 · 3 comments

Comments

@olafthiele
Copy link

I tried my project and got the error, so I tried meteor create testproj --react to create an empty project, this leads to the following error with the given config. Any hints why I get this error?

Mup version (mup --version): 1.5.11

Mup config

{
  "servers": {
    "one": {
      "host": "1.2.3.4",
      "username": "root",
      "pem": "~/.ssh/pem"
    }
  },
  "app": {
    "name": "my-app",
    "path": "../",
    "servers": {
      "one": {
        "env": {
          "PORT": 3399
        }
      }
    },
    "buildOptions": {
      "serverOnly": true,
      "buildLocation": "C:\\Users\\user23\\AppData\\Local\\Temp\\mup-meteor-9cd1b606-78be-40f5-813b-fc541b6d2b0b",
      "cleanBuildLocation": true
    },
    "env": {
      "ROOT_URL": "http://subdomain.subdomain.host.com",
      "MONGO_URL": "mongodb://mongodb:27017/my-app"
    },
    "docker": {
      "image": "zodern/meteor:latest",
      "stopAppDuringPrepareBundle": true,
      "imagePort": 3000,
      "args": [
        "--link=mongodb:mongodb"
      ]
    },
    "type": "meteor"
  },
  "mongo": {
    "version": "3.6.8",
    "servers": {
      "one": {}
    },
    "dbName": "testproj"
  }
}
 Config is valid

Output of command

 C:\data\code\node\testproj\.deploy> mup deploy
Cleaning Up Previous Builds
Building App Bundle Locally
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme

Started TaskList: Pushing Meteor App
[1.2.3.4] - Pushing Meteor App Bundle to the Server
[1.2.3.4] - Pushing Meteor App Bundle to the Server: SUCCESS

Started TaskList: Prepare App Bundle
[1.2.3.4] - Prepare Bundle
[1.2.3.4] x Prepare Bundle: FAILED

              ------------------------------------STDERR------------------------------------

              ------------------------------------STDOUT------------------------------------
              "
         ---> Using cache
         ---> b6c5f454b940
        Step 5/6 : COPY ./ /built_app
         ---> 70f05f085eac
        Step 6/6 : RUN cd /built_app/programs/server &&     npm install --unsafe-perm
         ---> Running in fa186006b9fd
        npm warn deprecated [email protected]: This package is no longer supported.
        npm warn deprecated [email protected]: 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.
        npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
        npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
        npm warn deprecated [email protected]: This package is no longer supported.
        npm warn deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
        npm warn deprecated [email protected]: This package is no longer supported.
        npm warn deprecated [email protected]: This package is no longer supported.
        npm warn deprecated [email protected]: This package is no longer supported.
        npm warn deprecated [email protected]: This package is no longer supported.

        > install
        > node npm-rebuild.js

        rebuilt dependencies successfully
        rebuilt dependencies successfully
        npm error code EPERM
        npm error syscall chmod
        npm error path /built_app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/bin/babel-parser.js
        npm error errno -1
        npm error Error: EPERM: operation not permitted, chmod '/built_app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/bin/babel-parser.js'
        npm error     at async chmod (node:internal/fs/promises:1085:10)
        npm error     at async Promise.all (index 0)
        npm error     at async Promise.all (index 0)
        npm error     at async #createBinLinks (/home/app/.nvm/versions/node/v20.18.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:394:5)
        npm error     at async Promise.allSettled (index 0)
        npm error     at async #linkAllBins (/home/app/.nvm/versions/node/v20.18.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:375:5)
        npm error     at async #build (/home/app/.nvm/versions/node/v20.18.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:160:7)
        npm error     at async Arborist.rebuild (/home/app/.nvm/versions/node/v20.18.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:62:5)
        npm error     at async Rebuild.exec (/home/app/.nvm/versions/node/v20.18.0/lib/node_modules/npm/lib/commands/rebuild.js:57:7)
        npm error     at async Npm.exec (/home/app/.nvm/versions/node/v20.18.0/lib/node_modules/npm/lib/npm.js:207:9) {
        npm error   errno: -1,
        npm error   code: 'EPERM',
        npm error   syscall: 'chmod',
        npm error   path: '/built_app/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/@babel/parser/bin/babel-parser.js'
        npm error }
        npm error
        npm error The operation was rejected by your operating system.
        npm error It is likely you do not have the permissions to access this file as the current user
        npm error
        npm error If you believe this might be a permissions issue, please double-check the
        npm error permissions of the file and its containing directories, or try running
        npm error the command again as root/Administrator.
        npm error A complete log of this run can be found in: /home/app/.npm/_logs/2024-12-30T15_27_38_634Z-debug-0.log
        npm error code 255
        npm error path /built_app/programs/server
        npm error command failed
        npm error command sh -c node npm-rebuild.js
        npm notice
        npm notice New major version of npm available! 10.8.2 -> 11.0.0
        npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.0.0
        npm notice To update run: npm install -g [email protected]
        npm notice
        npm error A complete log of this run can be found in: /home/app/.npm/_logs/2024-12-30T15_27_32_391Z-debug-0.log
        The command '/bin/sh -c cd /built_app/programs/server &&     npm install --unsafe-perm' returned a non-zero code: 255

        real    0m23.102s
        user    0m0.781s
        sys     0m0.896s

              ------------------------------------------------------------------------------
@zodern
Copy link
Owner

zodern commented Dec 30, 2024

It should work with the zodern/meteor:root docker image.

There might be an issue with the permissions in the tar file created on Windows.

@olafthiele
Copy link
Author

Thanks @zodern, it works like a charm now with the Meteor 3.1 test project. For all others, change the docker image to:

    docker: {
      image: 'zodern/meteor:root',
    },

@zodern
Copy link
Owner

zodern commented Dec 30, 2024

Thanks. I'm glad it worked. I'll leave this issue open since we want it to also work with zodern/meteor:latest.

@zodern zodern reopened this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants