Code Monkey home page Code Monkey logo

Comments (7)

k2tomasz avatar k2tomasz commented on August 30, 2024 1

@sfirrin everything seems to be working fine. just not sure why i see that error..

from serverless-plugin-datadog.

sfirrin avatar sfirrin commented on August 30, 2024

Hi @k2tomasz thanks for opening this

I'm not able to reproduce on Mac Monterey, could you give more detail about your node version / OS / when you encounter this problem?

Searching I found a similar issue DataDog/datadog-ci#714 in datadog-ci which is a dependency of this library, but this was apparently fixed in DataDog/datadog-ci#943 2.16.1 while we use a newer version https://github.com/DataDog/serverless-plugin-datadog/blob/master/package.json#L59

from serverless-plugin-datadog.

k2tomasz avatar k2tomasz commented on August 30, 2024

@sfirrin my colleague on Mac M2 could not reproduce it either. I am on Windows 11, AMD.

I was integrating with datadog last week when I experienced this problem.

Tested on WSL (Ubuntu) and it does not work either. This would suggest the processor is to blame.

from serverless-plugin-datadog.

naomichi-y avatar naomichi-y commented on August 30, 2024

I am having the same problem and the error occurs when I run yarn install in a Docker container environment.
Using serverless-plugin-datadog 5.44.0 and have confirmed that datadog/datadog-ci ^2.17.2 is used in yarn.lock.

  • Serverless Framework version: 3.34.0
  • Datadog Serverless Plugin version: 5.42.0
  • Lambda function runtime (Python 3.7, Node 10, etc.): runtime: nodejs16.x
  • Host OS: Amazon Linux 2 (Intel)
# package.json
{
  "dependencies": {
    "serverless-plugin-datadog": "^5.44.0",
    "yarn": "^1.22.19"
  }
}
# Dockerfile
FROM amazon/aws-lambda-ruby:3.2

WORKDIR /app

# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html
# Amazon Linux 2 does not currently support the current LTS release (version 18.x) of Node.js. Use Node.js version 16.x with the following command instead.
RUN curl -sL https://rpm.nodesource.com/setup_17.x | bash -
RUN yum install -y nodejs ca-certificates && \
  rm -rf /var/cache/yum/* && \
  yum clean all
RUN npm install -g yarn

COPY package.json yarn.lock ./
RUN yarn global add [email protected]
RUN yarn
# docker build .
Step 9/11 : RUN yarn
 ---> Running in 8fc93e58b9c4
yarn install v1.22.19
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] || 2.x || 1.x".
[4/4] Building fresh packages...
warning Error running install script for optional dependency: "/app/node_modules/cpu-features: Command failed.
Exit code: 1
Command: node buildcheck.js > buildcheck.gypi && node-gyp rebuild
Arguments:
Directory: /app/node_modules/cpu-features
Output:
/app/node_modules/buildcheck/lib/index.js:115
  throw new Error('Unable to detect compiler type');
  ^

Error: Unable to detect compiler type
    at BuildEnvironment.getKind (/app/node_modules/buildcheck/lib/index.js:115:9)
    at BuildEnvironment.tryCompile (/app/node_modules/buildcheck/lib/index.js:537:15)
    at BuildEnvironment.checkHeader (/app/node_modules/buildcheck/lib/index.js:423:25)
    at Object.<anonymous> (/app/node_modules/cpu-features/buildcheck.js:16:4)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47

Node.js v17.9.0"
info This module is OPTIONAL, you can safely ignore this error
success Saved lockfile.
Done in 18.02s.
Removing intermediate container 8fc93e58b9c4
 ---> c5b1a2c8b3e1

However, the subsequent RUN seems to be executed, although an error is generated.
(The problem does not occur when using the Docker image amazon/aws-lambda-ruby:2.7 )

from serverless-plugin-datadog.

sfirrin avatar sfirrin commented on August 30, 2024

Interesting, thanks for sharing @naomichi-y. We still need to track down the cause of this

@k2tomasz does this prevent you from installing / building, or just show the error message? If it is the error message only, from what I can tell this should be safe to ignore

from serverless-plugin-datadog.

naomichi-y avatar naomichi-y commented on August 30, 2024

#422 (comment)
I had this problem in an Amazon Linux 2 environment and was able to eliminate the problem by installing the following package.

yum install -y make gcc gcc-c++ make python3
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
      - serverless
      - sls
Done in 19.25s.
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.83s.

There was no problem before, but I don't know why the error occurred.

from serverless-plugin-datadog.

astuyve avatar astuyve commented on August 30, 2024

Closing this as the last two comments indicate other changes solve the issue. Please feel free to re-open this or a support ticket if there are any concerns.

Thanks!

from serverless-plugin-datadog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.