Comments (7)
@sfirrin everything seems to be working fine. just not sure why i see that error..
from serverless-plugin-datadog.
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.
@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.
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.
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.
#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.
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)
- Feature request: Support for Node 20 HOT 3
- id.toArray is not a function after triggering flush and before posting payload to DataDog HOT 2
- Monitors no data HOT 2
- AWS_LAMBDA_EXEC_WRAPPER should not be set for python runtimes HOT 3
- Support provided.al2023 runtime HOT 3
- Logs are not excluded with `datadog.yaml` HOT 1
- Excluding Unnecessary Library Spans in Lambda HOT 2
- Unable to add datadog layer when runtime nodejs20.x HOT 1
- 5.60.0 regression - Remote config is disabled; AppSec will not be able to use it HOT 9
- Plugin configuration with only log forwarding (via forwarder) and monitors should not require wrapper HOT 9
- Support for Datadog Teams HOT 1
- Removing monitors doesn't work HOT 1
- golang continous profiler HOT 1
- Add support for serverless v4 HOT 3
- Show Missing Environment Variables Warning when Running Deploy with --package Option HOT 1
- Variables are not Replaced in Recommended Monitor Title HOT 2
- Bump `@datadog/datadog-ci` version to at least v2.38.0 to avoid vulnerability in ws < 7.5.10 HOT 7
- bump datadog-lambda-extension version to v62 HOT 2
- Alert threshold is hard coded in the message of recommended monitors
- Vulnerability due to transitive dependency fast-xml-parser HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-plugin-datadog.