cloudinary / cloudinary_npm

Cloudinary NPM for node.js integration
625 stars 317 forks source link

[ARM64] error: Invalid CLOUDINARY_URL protocol #691

Closed jd-apprentice closed 1 week ago

jd-apprentice commented 1 week ago

Describe the bug in a sentence or two.

Project won't load CLOUDINARY_URL on ARM64 but works okay in x64

image

Steps to reproduce

  1. create a simple bunjs app with express
  2. build a dockerfile with bun (run it even without building)
  3. create a docker swarm (can be docker standalone)
  4. use a .env file
  5. docker stack deploy -c app.yml app

Error screenshots

image

Proof

environment variable is fine

image

Versions and Libraries (fill in the version numbers)

cloudinary 2.4.0 - const cloudinary = require("cloudinary").v2; Bun - 1.1.26

Config Files (Please paste the following files if possible)

{
  "name": "waifuland_api",
  "version": "1.0.0",
  "author": "jd-apprentice",
  "license": "MIT",
  "main": "dist/index.js",
  "type": "module",
  "scripts": {
    "prebuild": "rm -rf dist",
    "build": "bun build src/app/index.ts --target=bun --minify --outdir dist",
    "dev": "NODE_ENV=development bun --watch src/app/index.ts",
    "start": "NODE_ENV=production bun dist/index.js",
    "lint": "eslint ./src/**/*.ts",
    "lint:fix": "eslint ./src/**/*.ts --fix",
    "format": "prettier --check ./src/**/*.ts",
    "format:fix": "prettier --write ./src/**/*.ts",
    "husky": "husky",
    "test": "bun test --coverage"
  },
  "dependencies": {
    "@hapi/boom": "^10.0.1",
    "bcrypt": "^5.1.1",
    "cloudinary": "^2.4.0",
    "cors": "^2.8.5",
    "express": "^4.19.2",
    "helmet": "^7.1.0",
    "jsonwebtoken": "^9.0.2",
    "jwt-decode": "^3.1.2",
    "mongodb": "^6.8.1",
    "mongoose": "^8.6.1",
    "multer": "^1.4.4",
    "multer-storage-cloudinary": "^4.0.0",
    "rollbar": "^2.26.4"
  },
  "devDependencies": {
    "@types/bcrypt": "^5.0.2",
    "@types/bun": "^1.1.8",
    "@types/cors": "^2.8.17",
    "@types/express": "^4.17.21",
    "@types/jsonwebtoken": "^8.5.9",
    "@types/morgan": "^1.9.9",
    "@types/multer": "^1.4.12",
    "@types/supertest": "^6.0.2",
    "aws-sdk": "^2.1691.0",
    "eslint": "9.x",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-security": "^3.0.1",
    "husky": "^9.1.5",
    "mock-aws-s3": "^4.0.2",
    "nock": "^13.5.5",
    "prettier": "^3.3.3",
    "supertest": "^6.3.4"
  }
}

Repository

The repository that I'm using is the following

https://github.com/jd-apprentice/waifuland-api

Also app is published in docker-hub https://hub.docker.com/r/dyallo/waifuland_api

jd-apprentice commented 1 week ago

It was a skill issue, I had to literally not use double quotes

image

My bad, closing this! :)