Guys please help me when i try to run docker compose up in almalinux 8, its throw this error, in win...
r

Rezwan Ahmed Sami

over 1 year ago
Guys please help me when i try to run docker compose up in almalinux 8, its throw this error, in windows 11 in my local computer its fine, but in dedicated server have this problem
[root@ns3209505 pioneered]# docker compose up
WARN[0000] /home/pioneered/repositories/pioneered/docker-compose.yml:
version
is obsolete [+] Building 8.5s (10/32) docker:default => [growthbook internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 3.94kB 0.0s => [growthbook internal] load metadata for docker.io/library/python:3.11-slim 0.6s => [growthbook internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [growthbook pybuild 1/4] FROM docker.io/library/python:3.11-slim@sha256:6d2502238109c929569ae99355e28890c438cb11bc88ef02cd189c173b3db07c 0.0s => [growthbook internal] load build context 0.1s => => transferring context: 156.63kB 0.0s => CACHED [growthbook pybuild 2/4] WORKDIR /usr/local/src/app 0.0s => ERROR [growthbook nodebuild 3/17] RUN apt-get update && apt-get install -y wget gnupg2 build-essential && echo "deb https://deb.nodesource.com/node_20.x buster main" > /etc/apt/sources.lis 7.6s => ERROR [growthbook stage-2 3/11] RUN apt-get update && apt-get install -y wget gnupg2 && echo "deb https://deb.nodesource.com/node_20.x buster main" > /etc/apt/sources.list.d/nodesource.lis 7.6s => CACHED [growthbook pybuild 3/4] COPY ./packages/stats . 0.0s => CANCELED [growthbook pybuild 4/4] RUN pip3 install poetry && poetry install --no-root --no-dev --no-interaction --no-ansi && poetry build && poetry export -f requirements.txt --output r 7.6s ------ > [growthbook nodebuild 3/17] RUN apt-get update && apt-get install -y wget gnupg2 build-essential && echo "deb https://deb.nodesource.com/node_20.x buster main" > /etc/apt/sources.list.d/nodesource.list && wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && wget -qO- https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && apt-get update && apt-get install -yqq nodejs=$(apt-cache show nodejs|grep Version|grep nodesource|cut -c 10-) yarn && apt-get clean && rm -rf /var/lib/apt/lists/*: 0.512 Ign:1 http://deb.debian.org/debian bookworm InRelease 0.512 Ign:2 http://deb.debian.org/debian bookworm-updates InRelease 0.512 Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease 1.513 Ign:1 http://deb.debian.org/debian bookworm InRelease 1.513 Ign:2 http://deb.debian.org/debian bookworm-updates InRelease 1.513 Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease 3.514 Ign:1 http://deb.debian.org/debian bookworm InRelease 3.514 Ign:2 http://deb.debian.org/debian bookworm-updates InRelease 3.514 Ign:3 http://deb.debian.org/debian-security bookworm-security InRelease 7.515 Err:1 http://deb.debian.org/debian bookworm InRelease 7.515 Temporary failure resolving 'deb.debian.org' 7.515 Err:2 http://deb.debian.org/debian bookworm-updates InRelease 7.515 Temporary failure resolving 'deb.debian.org' 7.515 Err:3 http://deb.debian.org/debian-security bookworm-security InRelease 7.515 Temporary failure resolving 'deb.debian.org' 7.516 Reading package lists... 7.519 W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease Temporary failure resolving 'deb.debian.org' 7.519 W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease Temporary failure resolving 'deb.debian.org' 7.519 W: Failed to fetch http://deb.debian.org/debian-security/dists/bookworm-security/InRelease Temporary failure resolving 'deb.debian.org' 7.519 W: Some index files failed to download. They have been ignored, or old ones used instead. 7.522 Reading package lists... 7.525 Building dependency tree... 7.525 Reading state information... 7.526 Package gnupg2 is not available, but is referred to by another package. 7.526 This may mean that the package is missing, has been obsoleted, or 7.526 is only available from another source 7.526 However the following packages replace it: 7.526 gpgv 7.526 7.526 E: Unable to locate package wget 7.526 E: Package 'gnupg2' has no installation candidate 7.526 E: Unable to locate package build-essential
Hi all, I'm working on getting GrowthBook integrated into a React Js application to get rid of our ...
j

Josh Stafford

over 2 years ago
Hi all, I'm working on getting GrowthBook integrated into a React Js application to get rid of our current solution. I've got the initialisation working in the
App.js
file but I have a redux reducer where I'm attempting to setAttributes on a user any time an update happens to the user within our application. I have a few questions... • Is this possible? The reason I'm doing this is we have some features which are enabled for certain groups of people. ie. internal features only enabled for users with certain emails/company information on their client data. • When i set the attributes they dont get updated on the attributes screen here https://app.growthbook.io/attributes is there something I'm doing wrong? • The Chrome plugin for Growthbook doesn't seem to be working, do I need any setup in order to get this going? • Is there somewhere that I can have a development SDK key and a production SDK key, reason being for testing tickets in a development environment with flags and then passing them through or duplicating them into prod. • I'd love to move to a paid plan but can I trial this first? Appreciate the help in advance! Here's the code I'm using in the reducer in order to try and set the client attributes.
reducers: {
    setClientData: (state, action) => {
      console.log("Updating growthbook data with", action.payload)
      growthbook.setAttributes({
        "id": fire.auth().currentUser.uid,
        ...action.payload,
      });
      state.data = action.payload;
    },
  } ...
Hi everyone, I need some help to initiate the growthbook project with vanilla nodejs. So, I iniciate...
f

Fernando Giaretta

over 2 years ago
Hi everyone, I need some help to initiate the growthbook project with vanilla nodejs. So, I iniciated a NodeJS (v18.12.1) empty project to test the GrowthBook tool.
mkdir test
cd test
npm init -y
npm install --save @growthbook/growthbook
touch index.js
inside
index.js
file, I paste the Step 1 from the guide (https://docs.growthbook.io/lib/js)
import { GrowthBook } from "@growthbook/growthbook";

// Create a GrowthBook instance
const gb = new GrowthBook({
  apiHost: "<https://cdn.growthbook.io>",
  clientKey: "sdk-key",
  // Enable easier debugging of feature flags during development
  enableDevMode: true,
});

// Wait for features to be available
await gb.loadFeatures({ autoRefresh: true });

const color = gb.getFeatureValue("button-color");
When I executed
node index.js
, the terminal yield
(node:38068) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
./tmp/test/index.js:1
import { GrowthBook } from "@growthbook/growthbook";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1088:15)
    at Module._compile (node:internal/modules/cjs/loader:1123:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.12.1
Then I add this line to
package.json
"type": "module",
And run again the code. This time the error message was this
./tmp/test/index.js:1
import { GrowthBook } from "@growthbook/growthbook";
         ^^^^^^^^^^
SyntaxError: Named export 'GrowthBook' not found. The requested module '@growthbook/growthbook' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@growthbook/growthbook';
const { GrowthBook } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)

Node.js v18.12.1
And then, I change the
index.js
file to this
import pkg from '@growthbook/growthbook';
const { GrowthBook } = pkg;

// Create a GrowthBook instance
const gb = new GrowthBook({
  apiHost: "<https://cdn.growthbook.io>",
  clientKey: "sdk-key",
  // Enable easier debugging of feature flags during development
  enableDevMode: true,
});

// Wait for features to be available
await gb.loadFeatures({ autoRefresh: true });

const color = gb.getFeatureValue("button-color");
And run the nodejs file again. This time I received this error message:
(node:38721) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
./tmp/test/node_modules/@growthbook/growthbook/dist/esm/index.js:1
export { setPolyfills, clearCache, configureCache } from "./feature-repository";
^^^^^^

SyntaxError: Unexpected token 'export'
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1088:15)
    at Module._compile (node:internal/modules/cjs/loader:1123:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)

Node.js v18.12.1
Can get any help?