Skip to content
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

Issue with frontend install via setup.bash #6

Open
astewartau opened this issue Jun 26, 2023 · 5 comments
Open

Issue with frontend install via setup.bash #6

astewartau opened this issue Jun 26, 2023 · 5 comments

Comments

@astewartau
Copy link
Collaborator

The setup.bash script currently has:

#!/bin/bash

cd frontend
npm install
npm build
cd ..

cd api
sudo apt-get update
sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source
npm install
npm i -g ts-node

There is an issue with the frontend install inside the container on the npm build step, where I get:

npm WARN build `npm build` called with no arguments. Did you mean to `npm run-script build`?

I tried doing as it suggested and using npm run-script build instead and got:

> [email protected] build /opt/QSMxT-UI/frontend
> react-scripts 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.
  
Failed to compile.

[eslint] Failed to load plugin '@typescript-eslint' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module 'eslint/use-at-your-own-risk'
Require stack:
- /opt/QSMxT-UI/frontend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js
- /opt/QSMxT-UI/frontend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js
- /opt/QSMxT-UI/frontend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
- /opt/QSMxT-UI/frontend/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
- /opt/QSMxT-UI/frontend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-06-26T23_53_10_135Z-debug.log

I wonder if you know what the solution here could be?

@CampbellTimm
Copy link
Owner

CampbellTimm commented Jun 27, 2023 via email

@astewartau
Copy link
Collaborator Author

astewartau commented Jun 27, 2023

Thanks for the suggestion! I don't see the pattern ***@***.*** in the package.json file anywhere, but I tried removing the package-lock.json file. I get the same error with npm run build on the frontend:

(base) root@2fbd9a25d898:/opt/QSMxT-UI/frontend# npm run build

> [email protected] build /opt/QSMxT-UI/frontend
> react-scripts build

Creating an optimized production build...
Failed to compile.

[eslint] Failed to load plugin '@typescript-eslint' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module 'eslint/use-at-your-own-risk'
Require stack:
- /opt/QSMxT-UI/frontend/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js
- /opt/QSMxT-UI/frontend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js
- /opt/QSMxT-UI/frontend/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
- /opt/QSMxT-UI/frontend/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
- /opt/QSMxT-UI/frontend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-06-27T03_55_26_405Z-debug.log

@astewartau
Copy link
Collaborator Author

To help make this easier to debug, I've created a GitHub Action on this repository that automatically runs the setup.sh script on each commit. Could you look at the Action output to see where it is failing?

This is the main GitHub Actions page.

This is the most recent run with debug output.

I also changed node from v12.13 to v14.17.0 (see the GitHub Actions workflow file that specifies it here. I changed this because I was getting a lot of warnings about packages that depended on the updated version, and there doesn't seem to be anything that specifically requires the older v12.13.

@astewartau
Copy link
Collaborator Author

I've made some progress on my fork of the repository - hopefully, I can solve this one soon. :)

@CampbellTimm
Copy link
Owner

CampbellTimm commented Jun 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants