-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker image build failed #77
Comments
dockerfile update code ** WORKDIR /usr/src/app COPY package.json . RUN apk add --no-cache --virtual .gyp COPY . . EXPOSE 3000 CMD npm run build |
2024-06-20T08:06:56.396783543Z |
我知道原因了,需要将return timestamp - timestamp % 10_000;更改为return timestamp - timestamp % 10000; |
真是一波三折,thx4u |
I want to convert the project into a docker image and run it, but I get the following error.
**47.41 Building: /usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
47.47 gyp info it worked if it ends with ok
47.47 gyp verb cli [
47.47 gyp verb cli '/usr/local/bin/node',
47.47 gyp verb cli '/app/node_modules/node-gyp/bin/node-gyp.js',
47.47 gyp verb cli 'rebuild',
47.47 gyp verb cli '--verbose',
47.47 gyp verb cli '--libsass_ext=',
47.47 gyp verb cli '--libsass_cflags=',
47.47 gyp verb cli '--libsass_ldflags=',
47.47 gyp verb cli '--libsass_library='
47.47 gyp verb cli ]
47.47 gyp info using [email protected]
47.47 gyp info using [email protected] | linux | arm64
47.47 gyp verb command rebuild []
47.47 gyp verb command clean []
47.48 gyp verb clean removing "build" directory
47.48 gyp verb command configure []
47.49 gyp verb check python checking for Python executable "python2" in the PATH
47.49 gyp verb
which
failed Error: not found: python247.49 gyp verb
which
failed at getNotFoundError (/app/node_modules/which/which.js:13:12)47.49 gyp verb
which
failed at F (/app/node_modules/which/which.js:68:19)47.49 gyp verb
which
failed at E (/app/node_modules/which/which.js:80:29)47.49 gyp verb
which
failed at /app/node_modules/which/which.js:89:1647.49 gyp verb
which
failed at /app/node_modules/isexe/index.js:42:547.49 gyp verb
which
failed at /app/node_modules/isexe/mode.js:8:547.49 gyp verb
which
failed at FSReqCallback.oncomplete (fs.js:192:21)47.49 gyp verb
which
failed python2 Error: not found: python247.49 gyp verb
which
failed at getNotFoundError (/app/node_modules/which/which.js:13:12)47.49 gyp verb
which
failed at F (/app/node_modules/which/which.js:68:19)47.49 gyp verb
which
failed at E (/app/node_modules/which/which.js:80:29)47.49 gyp verb
which
failed at /app/node_modules/which/which.js:89:1647.49 gyp verb
which
failed at /app/node_modules/isexe/index.js:42:547.49 gyp verb
which
failed at /app/node_modules/isexe/mode.js:8:547.49 gyp verb
which
failed at FSReqCallback.oncomplete (fs.js:192:21) {47.49 gyp verb
which
failed code: 'ENOENT'47.49 gyp verb
which
failed }47.49 gyp verb check python checking for Python executable "python" in the PATH
47.49 gyp verb
which
succeeded python /usr/bin/python47.51 gyp ERR! configure error
47.51 gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
47.51 gyp ERR! stack File "", line 1
47.51 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
47.51 gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47.51 gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
47.51 gyp ERR! stack
47.51 gyp ERR! stack at ChildProcess.exithandler (child_process.js:383:12)
47.51 gyp ERR! stack at ChildProcess.emit (events.js:400:28)
47.51 gyp ERR! stack at maybeClose (internal/child_process.js:1088:16)
47.51 gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
47.51 gyp ERR! System Linux 6.5.11-linuxkit
47.51 gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
47.51 gyp ERR! cwd /app/node_modules/node-sass
47.51 gyp ERR! node -v v14.21.3
47.51 gyp ERR! node-gyp -v v3.8.0
47.51 gyp ERR! not ok
47.52 Build failed with error code: 1
48.02 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
48.02 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
48.03 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
48.03 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
48.04 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
48.04 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
48.04
48.15 npm ERR! code ELIFECYCLE
48.15 npm ERR! errno 1
48.15 npm ERR! [email protected] postinstall:
node scripts/build.js
48.15 npm ERR! Exit status 1
48.15 npm ERR!
48.15 npm ERR! Failed at the [email protected] postinstall script.
48.15 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
48.17
48.17 npm ERR! A complete log of this run can be found in:
48.17 npm ERR! /root/.npm/_logs/2024-01-02T11_17_46_603Z-debug.log
Dockerfile:10
8 | RUN npm install -g gyp
9 | RUN apk add g++ make py3-pip
10 | >>> RUN npm install
11 |
12 | # Bundle app source
ERROR: failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/upuy4whk515yr6won5uj9fk0g**
The text was updated successfully, but these errors were encountered: