socket.io-admin-ui
socket.io-admin-ui copied to clipboard
mac m1 build problem
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 [email protected]: 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 [email protected]
npm ERR! gyp info using [email protected] | 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 which
failed Error: not found: python2
npm ERR! gyp verb which
failed at getNotFoundError (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:13:12)
npm ERR! gyp verb which
failed at F (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:68:19)
npm ERR! gyp verb which
failed at E (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:80:29)
npm ERR! gyp verb which
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:89:16
npm ERR! gyp verb which
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:199:21)
npm ERR! gyp verb which
failed python2 Error: not found: python2
npm ERR! gyp verb which
failed at getNotFoundError (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:13:12)
npm ERR! gyp verb which
failed at F (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:68:19)
npm ERR! gyp verb which
failed at E (/Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:80:29)
npm ERR! gyp verb which
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/which/which.js:89:16
npm ERR! gyp verb which
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/isexe/index.js:42:5
npm ERR! gyp verb which
failed at /Users/gospeed/Documents/Backend/socket.io-admin-ui/ui/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:199:21) {
npm ERR! gyp verb which
failed code: 'ENOENT'
npm ERR! gyp verb which
failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb which
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 **
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 npm install -g [email protected]
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
#RUN npm install -D rollup-plugin-sass-migrator sass-migrator
COPY . .
EXPOSE 3000
CMD npm run build