reanahub / reana-ui

REANA UI frontend
http://reana-ui.rtfd.io
MIT License
4 stars 33 forks source link

build: cleanup & improvements #109

Open mvidalgarcia opened 4 years ago

mvidalgarcia commented 4 years ago
[1] ```console yarn install v1.22.4 info No lockfile found. [1/4] πŸ” Resolving packages... warning less-loader > less > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning node-sass > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning react-scripts > jest-environment-jsdom-fourteen > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning react-scripts > webpack-dev-server > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. warning react-scripts > webpack-dev-server > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. warning react-scripts > babel-jest > @jest/transform > jest-haste-map > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. warning react-scripts > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning react-scripts > resolve-url-loader > rework > css > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning react-scripts > resolve-url-loader > rework > css > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > left-pad@1.3.0: use String.prototype.padStart() warning react-scripts > resolve-url-loader > rework > css > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated warning react-scripts > workbox-webpack-plugin > workbox-build > strip-comments > babel-plugin-transform-object-rest-spread > babel-runtime > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. P lease, upgrade your dependencies to the actual version of core-js@3. warning semantic-ui-react > react-popper > popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 [2/4] 🚚 Fetching packages... [3/4] πŸ”— Linking dependencies... warning " > less-loader@6.1.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "@typescript-eslint/eslint-plugin@2.x". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "@typescript-eslint/parser@2.x". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "babel-eslint@10.x". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "eslint-plugin-flowtype@3.x || 4.x". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "eslint-plugin-import@2.x". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "eslint-plugin-jsx-a11y@6.x". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "eslint-plugin-react-hooks@1.x || 2.x". warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". [4/4] πŸ”¨ Building fresh packages... success Saved lockfile. ✨ Done in 24.43s. ```
[2] ```console Step 6/11 : RUN cd reana-ui && yarn && yarn build ---> Running in fb65c9f82f57 yarn install v1.22.4 warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/4] Resolving packages... success Already up-to-date. Done in 0.77s. yarn run v1.22.4 $ craco build Creating an optimized production build... Failed to compile. ./node_modules/semantic-ui-less/semantic.less @import (multiple) '../../theme.config'; ^ Less resolver error: '../../theme.config' wasn't found. Tried - /code/reana-ui/node_modules/semantic-ui-less/theme.config,../../theme.config Webpack resolver error details: resolve '../../theme.config' in '/code/reana-ui/node_modules/semantic-ui-less/definitions/modules' using description file: /code/reana-ui/node_modules/semantic-ui-less/package.json (relative path: ./definitions/modules) aliased with mapping '../../theme.config': '/code/reana-ui/src/semantic-ui/theme.config' to '/code/reana-ui/src/semantic-ui/theme.config' using description file: /code/reana-ui/node_modules/semantic-ui-less/package.json (relative path: ./definitions/modules) Field 'browser' doesn't contain a valid alias configuration using description file: /code/reana-ui/package.json (relative path: ./src/semantic-ui/theme.config) no extension Field 'browser' doesn't contain a valid alias configuration existing file: /code/reana-ui/src/semantic-ui/theme.config /code/reana-ui/src/semantic-ui/theme.config doesn't match the restriction /\.(le|c)ss$/i .less Field 'browser' doesn't contain a valid alias configuration /code/reana-ui/src/semantic-ui/theme.config.less doesn't exist .css Field 'browser' doesn't contain a valid alias configuration /code/reana-ui/src/semantic-ui/theme.config.css doesn't exist as directory /code/reana-ui/src/semantic-ui/theme.config is not a directory Webpack resolver error missing: /code/reana-ui/src/semantic-ui/theme.config.less,/code/reana-ui/src/semantic-ui/theme.config.css,/code/reana-ui/src/semantic-ui/theme.config Error in /code/reana-ui/node_modules/semantic-ui-less/definitions/modules/transition.less (line 19, column 0) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. The command '/bin/sh -c cd reana-ui && yarn && yarn build' returned a non-zero code: 1 [2020-06-24T11:13:07] reana-ui: Command 'docker build --build-arg DEBUG=1 -t reanahub/reana-ui:latest .' returned non-zero exit status 1. ```
mvidalgarcia commented 4 years ago

https://github.com/webpack-contrib/less-loader/issues/366

mvidalgarcia commented 3 years ago

So far we've been using yarn in PROD, and we're pushing the yarn.lock file to avoid dependency problems, so for the time being we're going to stick with it. We can reevaluate yarn vs npm in the future.

tiborsimko commented 1 year ago

Example:

$ craco build
Creating an optimized production build...
One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
"@babel/plugin-proposal-private-property-in-object" is already in your
node_modules folder for unrelated reasons, but it may break at any time.

babel-preset-react-app is part of the create-react-app project, which
is not maintianed anymore. It is thus unlikely that this bug will
ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
your devDependencies to work around this error. This will make this message
go away.
mdonadoni commented 1 year ago

Example:


$ craco build
Creating an optimized production build...
One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. [...]

This will be fixed by #344, but many warnings are still present when running yarn