Open mvidalgarcia opened 4 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.
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.
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
yarn.lock
orpackage-lock.json
) to freeze dependencies (pip-compile style)npm
vsyarn
(at the moment we're usingyarn
in production).less-loader
(@semantic-ui-react/craco-less
>craco-less
>less-loader
) pinned to 6.1.1 due to build errors in 6.1.2 [2][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. ```