taskcafe icon indicating copy to clipboard operation
taskcafe copied to clipboard

Unable to build project

Open sitemapxml opened this issue 4 years ago • 4 comments

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

sitemapxml avatar Dec 25 '21 23:12 sitemapxml

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

EndlessJourney99 avatar Jun 13 '22 03:06 EndlessJourney99

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?

sitemapxml avatar Jun 15 '22 19:06 sitemapxml

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.

EndlessJourney99 avatar Jun 16 '22 03:06 EndlessJourney99

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.

sitemapxml avatar Jun 18 '22 19:06 sitemapxml