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

Error evaluating function floor: argument must be a number #94

Closed
xkitsios opened this issue Apr 12, 2022 · 2 comments
Closed

Error evaluating function floor: argument must be a number #94

xkitsios opened this issue Apr 12, 2022 · 2 comments

Comments

@xkitsios
Copy link

xkitsios commented Apr 12, 2022

Hi! I was updating NodeBB from v1.19.3 to v1.19.5 and I encountered the following error:

2022-04-12T12: 38: 15.417Z [4567/365733] - error: uncaughtException: Error evaluating function `floor`: argument must be a number
  No stack trace {
    "date": "Tue Apr 12 2022 15:38:15 GMT+0300 (Eastern European Summer Time)",
    "error": {
        "callLine": null,
        "column": 35,
        "extract": [
            "@navbar-border-radius:             @border-radius-base;",
            "@navbar-padding-horizontal:        floor(@grid-gutter-width / 2);",
            "@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);"
        ],
        "filename": "/data/nodebb/node_modules/nodebb-theme-lavender/less/variables.less",
        "index": 8419,
        "line": 270,
        "message": "Error evaluating function `floor`: argument must be a number",
        "type": "Argument"
    },
    "exception": true,
    "os": {
        "loadavg": [
            0.92,
            0.41,
            0.21
        ],
        "uptime": 623519.7
    },
    "process": {
        "argv": [
            "/usr/bin/node",
            "/data/nodebb/nodebb",
            "upgrade"
        ],
        "cwd": "/data/nodebb",
        "execPath": "/usr/bin/node",
        "gid": 1000,
        "memoryUsage": {
            "arrayBuffers": 18833063,
            "external": 20897496,
            "heapTotal": 278740992,
            "heapUsed": 251825744,
            "rss": 341565440
        },
        "pid": 365733,
        "uid": 1000,
        "version": "v16.14.2"
    },
    "trace": []
}
xkitsios added a commit to xkitsios/nodebb-theme-lavender that referenced this issue Apr 12, 2022
@xkitsios xkitsios changed the title Error updating NodeBB from v1.19.3 to v1.19.5 Error evaluating function floor: argument must be a number Apr 12, 2022
@wu-lee
Copy link

wu-lee commented Apr 14, 2022

I'm also seeing this error - it's preventing NodeBB from rebuilding and starting.

Specifically:

Apr 14 17:05:10 2022-04-14T16:05:10.629Z [4567/45] - info: [build] client side styles build started
Apr 14 17:05:12 2022-04-14T16:05:12.400Z [4567/45] - error: [build] client side styles build failed
Apr 14 17:05:12 2022-04-14T16:05:12.401Z [4567/45] - error: [build] Encountered error during build step
Apr 14 17:05:12 ArgumentError: Error evaluating function `floor`: argument must be a number in /app/code/node_modules/nodebb-theme-lavender/less/variables.less on line 270, column 36:
Apr 14 17:05:12 269 @navbar-border-radius: @border-radius-base;
Apr 14 17:05:12 270 @navbar-padding-horizontal: floor(@grid-gutter-width / 2);
Apr 14 17:05:12 271 @navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
Apr 14 17:05:12
Apr 14 17:05:12 Error occurred during upgrade: undefined
Apr 14 17:05:12 2022-04-14T16:05:12.411Z [4567/45] - error: uncaughtException: Error evaluating function `floor`: argument must be a number
Apr 14 17:05:12 No stack trace {"date":"Thu Apr 14 2022 16:05:12 GMT+0000 (Coordinated Universal Time)","error":{"callLine":null,"column":35,"extract":["@navbar-border-radius: @border-radius-base;","@navbar-padding-horizontal: floor(@grid-gutter-width / 2);","@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);"],"filename":"/app/code/node_modules/nodebb-theme-lavender/less/variables.less","index":8419,"line":270,"message":"Error evaluating function `floor`: argument must be a number","type":"Argument"},"exception":true,"os":{"loadavg":[2.07,1.78,1.75],"uptime":372217.08},"process":{"argv":["/usr/local/node-16.13.1/bin/node","/app/code/nodebb","upgrade","--schema","--build"],"cwd":"/app/code","execPath":"/usr/local/node-16.13.1/bin/node","gid":1000,"memoryUsage":{"arrayBuffers":18641531,"external":20690239,"heapTotal":162250752,"heapUsed":150207496,"rss":222461952},"pid":45,"uid":1000,"version":"v16.13.1"},"trace":[]}

My NodeBB version: NodeBB v1.19.6
It's running as a Cloudron.io app, Cloudron 7.1.4

I can confirm that manually applying the patch referred to above allows it to boot, at least for now. Cloudron is a docker-based deployment so I expect this won't last unless a fixed version is released, or I disable Lavender.

@barisusakli
Copy link
Member

switched to sass in bs5 branch this should be resolved

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

3 participants