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

Unable to build project #142

Open
sitemapxml opened this issue Dec 25, 2021 · 4 comments
Open

Unable to build project #142

sitemapxml opened this issue Dec 25, 2021 · 4 comments

Comments

@sitemapxml
Copy link

sitemapxml commented Dec 25, 2021

This is the output when try to build project:

go run cmd/mage/main.go install
go: downloading github.com/magefile/mage v1.11.0
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["@apollo/client@latest"] is trying to unpack in the same destination "/home/user/.cache/yarn/v6/npm-@apollo-client-3.4.16-67090d5655aa843fa64d26f1913315e384a5fa0f-integrity/node_modules/@apollo/client" as pattern ["@apollo/client@^3.3.16"]. This could result in non-deterministic behavior, skipping.
[3/4] Linking dependencies...
warning " > @apollo/[email protected]" has incorrect peer dependency "@types/react@^16.8.0".
warning " > @apollo/[email protected]" has incorrect peer dependency "graphql@^14.3.1".
warning " > @apollo/[email protected]" has incorrect peer dependency "react@^16.8.0".
warning "@taskcafe/rich-markdown-editor > [email protected]" has incorrect peer dependency "prosemirror-tables@^0.9.1".
warning " > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning " > [email protected]" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
warning " > [email protected]" has unmet peer dependency "react-is@>= 16.8.0".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
Done in 85.58s.

go run cmd/mage/main.go build
yarn run v1.22.17
$ react-scripts build
Creating an optimized production build...
Failed to compile.

src/App/TopNavbar/index.tsx
  Line 19:1:  `shared/utils/polling` import should occur before import of `./ProjectFinder`  import/order

src/Projects/index.tsx
  Line 26:1:  `shared/components/FormInput` import should occur before import of `../shared/utils/styles`  import/order

src/shared/components/NotifcationPopup/index.tsx
  Line 369:64:  `"` can be escaped with `"`, `“`, `"`, `”`  react/no-unescaped-entities
  Line 369:90:  `"` can be escaped with `"`, `“`, `"`, `”`  react/no-unescaped-entities

Search for the keywords to learn more about each error.


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: running "yarn --cwd frontend build" failed with exit code 1
exit status 1

I was trying to build app from source with go version go1.17.5 linux/amd64

@EndlessJourney99
Copy link

Add these 2 lines to rules section in .eslintrc.json file in the frontend folder:
"import/order": "warn"
"react/no-unescaped-entities": "warn"

@sitemapxml
Copy link
Author

Hello, Thank you for the info.
Unfortunately, this didn't work as there is a new error.
I tried to build project again, but then this happened:

go run cmd/mage/main.go build
yarn run v1.22.19
$ react-scripts build
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating

And after running npx browserslist@latest --update-db, this was the output:

npx browserslist@latest --update-db

/home/user/.npm/_npx/072487b38308305a/node_modules/browserslist/update-db.js:15
    throw new BrowserslistError(
    ^
Error [BrowserslistError]: Cannot find package.json. Is this the right directory to run `npx browserslist --update-db` in?
    at detectLockfile (/home/user/.npm/_npx/072487b38308305a/node_modules/browserslist/update-db.js:15:11)
    at updateDB (/home/user/.npm/_npx/072487b38308305a/node_modules/browserslist/update-db.js:263:14)
    at Object.<anonymous> (/home/user/.npm/_npx/072487b38308305a/node_modules/browserslist/cli.js:43:3)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  browserslist: true
}

@JordanKnott Can you take a look at this, please?

@EndlessJourney99
Copy link

EndlessJourney99 commented Jun 16, 2022

Are you pulling source code from the latest master branch? If that is the case, I recommend you to download the 0.3.2 release.
The latest master branch has lots of bugs. And unfortunately, I don't see any activity of maintainer during this year, so maybe it won't receive any update in the future.

  • And for the warning about browserslist, maybe you should cd to the frontend folder first then run the command npx browserslist@latest --update-db.

@sitemapxml
Copy link
Author

Hello, sorry for the delay.
You were right about both the browserslist, and about the master branch.
Browserslist update works only if you descend to frontend folder, and build process is working normally for 0.3.2 release.
However, I haven't tested the app fully, but I managed to build the binary file without errors, so I guess that it would be working with appropriate configuration file.

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