Open sercangoger opened 10 months ago
It gave many problems, but I solved part of the problem by updating the dockerfile.
FROM node:15-alpine
WORKDIR /usr/src/app
COPY package.json .
RUN apk add --no-cache --virtual .gyp \ python \ make \ g++ \ && npm install \ && apk del .gyp RUN apk add python2
RUN apk add --update python2 make g++ && rm -rf /var/cache/apk/* RUN npm install RUN npm install -g sass-migrator RUN sass-migrator division */.scss
COPY . .
EXPOSE 3000
CMD npm run build
I want to install it on my local computer. by entering cd ui folder I'm doing npm install but this is the error I get
** npm WARN deprecated core-js@3.10.0: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 1 npm ERR! path /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/node-sass npm ERR! command failed npm ERR! command sh -c node scripts/build.js npm ERR! Building: /usr/local/bin/node /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm ERR! gyp info it worked if it ends with ok npm ERR! gyp verb cli [ npm ERR! gyp verb cli '/usr/local/bin/node', npm ERR! gyp verb cli '/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/node-gyp/bin/node-gyp.js', npm ERR! gyp verb cli 'rebuild', npm ERR! gyp verb cli '--verbose', npm ERR! gyp verb cli '--libsass_ext=', npm ERR! gyp verb cli '--libsass_cflags=', npm ERR! gyp verb cli '--libsass_ldflags=', npm ERR! gyp verb cli '--libsass_library=' npm ERR! gyp verb cli ] npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@20.9.0 | darwin | arm64 npm ERR! gyp verb command rebuild [] npm ERR! gyp verb command clean [] npm ERR! gyp verb clean removing "build" directory npm ERR! gyp verb command configure [] npm ERR! gyp verb check python checking for Python executable "python2" in the PATH npm ERR! gyp verb", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:422:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
npm ERR! gyp ERR! stack at Socket. (node:internal/child_process:457:11)
npm ERR! gyp ERR! stack at Socket.emit (node:events:514:28)
npm ERR! gyp ERR! stack at Pipe. (node:net:337:12)
npm ERR! gyp ERR! System Darwin 23.0.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/node-sass
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
which
failed Error: not found: python2 npm ERR! gyp verbwhich
failed at getNotFoundError (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:13:12) npm ERR! gyp verbwhich
failed at F (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:68:19) npm ERR! gyp verbwhich
failed at E (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:80:29) npm ERR! gyp verbwhich
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:89:16 npm ERR! gyp verbwhich
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/isexe/index.js:42:5 npm ERR! gyp verbwhich
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/isexe/mode.js:8:5 npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:199:21) npm ERR! gyp verbwhich
failed python2 Error: not found: python2 npm ERR! gyp verbwhich
failed at getNotFoundError (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:13:12) npm ERR! gyp verbwhich
failed at F (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:68:19) npm ERR! gyp verbwhich
failed at E (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:80:29) npm ERR! gyp verbwhich
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:89:16 npm ERR! gyp verbwhich
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/isexe/index.js:42:5 npm ERR! gyp verbwhich
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/isexe/mode.js:8:5 npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:199:21) { npm ERR! gyp verbwhich
failed code: 'ENOENT' npm ERR! gyp verbwhich
failed } npm ERR! gyp verb check python checking for Python executable "python" in the PATH npm ERR! gyp verbwhich
succeeded python /Users/Shared/anaconda3/bin/python npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Command failed: /Users/Shared/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack File "npm ERR! A complete log of this run can be found in: /Users/gospeed/.npm/_logs/2024-01-02T09_54_45_627Z-debug-0.log **