Hello,
I'm trying to use the @sentry/sentry-webpack-plugin in a project with a Docker from node:alpine and my webpack build is giving the following errors:
Note: I launch the build with this: docker build --tag=api . --build-arg SENTRY_ORG=my-org --build-arg SENTRY_AUTH_TOKEN=my-auth-token
Step 17/21 : RUN yarn build
---> Running in 2b914c65edc5
yarn run v1.15.2
$ backpack build
(node:33) UnhandledPromiseRejectionWarning: Error: spawn Unknown system error -8
at ChildProcess.spawn (internal/child_process.js:373:11)
at spawn (child_process.js:559:9)
at Object.execFile (child_process.js:224:15)
at Promise (/usr/src/api/node_modules/@sentry/cli/js/helper.js:147:20)
at new Promise (<anonymous>)
at Object.execute (/usr/src/api/node_modules/@sentry/cli/js/helper.js:137:10)
at Object.proposeVersion (/usr/src/api/node_modules/@sentry/cli/js/releases/index.js:57:8)
at SentryCliPlugin.getReleasePromise (/usr/src/api/node_modules/@sentry/webpack-plugin/src/index.js:162:27)
at new SentryCliPlugin (/usr/src/api/node_modules/@sentry/webpack-plugin/src/index.js:112:25)
at Object.webpack (/usr/src/api/backpack.config.js:24:9)
(node:33) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:33) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:33) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
(node:33) UnhandledPromiseRejectionWarning: Error: spawn Unknown system error -8
at ChildProcess.spawn (internal/child_process.js:373:11)
at spawn (child_process.js:559:9)
at Object.execFile (child_process.js:224:15)
at Promise (/usr/src/api/node_modules/@sentry/cli/js/helper.js:147:20)
at new Promise (<anonymous>)
at Object.execute (/usr/src/api/node_modules/@sentry/cli/js/helper.js:137:10)
at Object.proposeVersion (/usr/src/api/node_modules/@sentry/cli/js/releases/index.js:57:8)
at SentryCliPlugin.getReleasePromise (/usr/src/api/node_modules/@sentry/webpack-plugin/src/index.js:162:27)
at new SentryCliPlugin (/usr/src/api/node_modules/@sentry/webpack-plugin/src/index.js:112:25)
at Object.webpack (/usr/src/api/backpack.config.js:24:9)
(node:33) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Isolating the cli call, I have the following error on docker build:
Step 17/25 : RUN npx sentry-cli
---> Running in 3ee1764e848e
spawn Unknown system error -8
The command '/bin/sh -c npx sentry-cli' returned a non-zero code: 1
Isolating the package in node:alpine:
FROM node:alpine
RUN yarn add @sentry/webpack-plugin
RUN npx sentry-cli
Gives me the following output:
Step 1/3 : FROM node:alpine
---> 953c516e1466
Step 2/3 : RUN yarn add @sentry/webpack-plugin
---> Running in 476725a750e7
yarn add v1.15.2
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 14 new dependencies.
info Direct dependencies
└─ @sentry/webpack-plugin@1.6.2
info All dependencies
├─ @sentry/cli@1.40.0
├─ @sentry/webpack-plugin@1.6.2
├─ agent-base@4.2.1
├─ debug@3.2.6
├─ es6-promise@4.2.6
├─ es6-promisify@5.0.0
├─ fs-copy-file-sync@1.1.1
├─ https-proxy-agent@2.2.1
├─ minimist@0.0.8
├─ mkdirp@0.5.1
├─ ms@2.1.1
├─ node-fetch@2.3.0
├─ progress@2.0.0
└─ proxy-from-env@1.0.0
Done in 3.38s.
Removing intermediate container 476725a750e7
---> c7784ba53137
Step 3/3 : RUN npx sentry-cli
---> Running in 985421737f8a
internal/modules/cjs/loader.js:657
throw err;
^
Error: Cannot find module '/root/.npm/_npx/1/lib/node_modules/sentry-cli/tasks/download.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:655:15)
at Function.Module._load (internal/modules/cjs/loader.js:580:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:868:12)
at internal/main/run_main_module.js:21:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sentry-cli@0.0.4 postinstall: `node tasks/download.js`
npm ERR! Exit status 1
npm ERR! npm ERR! Failed at the sentry-cli@0.0.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-04-08T21_47_01_099Z-debug.log
Install for sentry-cli@latest failed with code 1
The command '/bin/sh -c npx sentry-cli' returned a non-zero code: 1
I'm not sure what am I doing wrong right now. Are there some packages I should add to node:alpine so the cli works?
Thank you for your time.
Hello,
I'm trying to use the @sentry/sentry-webpack-plugin in a project with a Docker from
node:alpineand my webpack build is giving the following errors:Note: I launch the build with this:
docker build --tag=api . --build-arg SENTRY_ORG=my-org --build-arg SENTRY_AUTH_TOKEN=my-auth-tokenIsolating the cli call, I have the following error on
docker build:Isolating the package in
node:alpine:Gives me the following output:
I'm not sure what am I doing wrong right now. Are there some packages I should add to
node:alpineso the cli works?Thank you for your time.