typefully / minimal-twitter

Minimal Theme for Twitter - Refine and Declutter Your Twitter Web Experience
https://typefully.com/minimal-twitter
MIT License
811 stars 47 forks source link

Can't build popup component (sed: can't read : No such file or directory) #148

Closed dangpzanco closed 1 year ago

dangpzanco commented 1 year ago

After running yarn && yarn build inside popup, I get this outcome:

yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.21s.
yarn run v1.22.19
$ next build && next export && mv out/_next out/next && sed -i '' -e 's/\/_next/\.\/next/g' out/**.html
info  - Checking validity of types  
info  - Creating an optimized production build  
info  - Compiled successfully
info  - Collecting page data  
info  - Generating static pages (3/3)
info  - Finalizing page optimization  

Page                                       Size     First Load JS
┌ ○ /                                      152 kB          223 kB
├   /_app                                  0 B            71.5 kB
└ ○ /404                                   194 B          71.7 kB
+ First Load JS shared by all              71.5 kB
  ├ chunks/framework-91d7f78b5b4003c8.js   42 kB
  ├ chunks/main-d98b4a7f39fdfc80.js        28.2 kB
  ├ chunks/pages/_app-9cd1d19dd7237c4c.js  493 B
  ├ chunks/webpack-49b6f2937c9ce9f4.js     838 B
  └ css/652716498c0e1e64.css               2.96 kB

○  (Static)  automatically rendered as static HTML (uses no initial props)

info  - using build directory: /home/daniel/Documents/git/minimal-twitter/popup/.next
info  - Copying "static build" directory
info  - No "exportPathMap" found in "undefined". Generating map from "./pages"
info  - Launching 15 workers
info  - Exporting (2/2)
Export successful. Files written to /home/daniel/Documents/git/minimal-twitter/popup/out
sed: can't read : No such file or directory
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I'm running this from Manjaro Linux and yarn (1.22.19) was installed globally via npm (8.19.2). Also note that I had to run yarn upgrade to avoid some errors with the browserslist package. The terminal output without yarn upgrade is as follows:

yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@codemirror/lang-css > @codemirror/autocomplete@6.4.0" has unmet peer dependency "@codemirror/view@^6.0.0".
warning "@codemirror/lang-css > @codemirror/autocomplete@6.4.0" has unmet peer dependency "@lezer/common@^1.0.0".
warning " > @uiw/react-codemirror@4.19.6" has unmet peer dependency "@babel/runtime@>=7.11.0".
warning " > @uiw/react-codemirror@4.19.6" has unmet peer dependency "@codemirror/state@>=6.0.0".
warning " > @uiw/react-codemirror@4.19.6" has unmet peer dependency "@codemirror/theme-one-dark@>=6.0.0".
warning " > @uiw/react-codemirror@4.19.6" has unmet peer dependency "@codemirror/view@>=6.0.0".
warning " > @uiw/react-codemirror@4.19.6" has unmet peer dependency "codemirror@>=6.0.0".
warning "@uiw/react-codemirror > @uiw/codemirror-extensions-basic-setup@4.19.6" has unmet peer dependency "@codemirror/autocomplete@>=6.0.0".
warning "@uiw/react-codemirror > @uiw/codemirror-extensions-basic-setup@4.19.6" has unmet peer dependency "@codemirror/language@>=6.0.0".
warning "@uiw/react-codemirror > @uiw/codemirror-extensions-basic-setup@4.19.6" has unmet peer dependency "@codemirror/lint@>=6.0.0".
warning "@uiw/react-codemirror > @uiw/codemirror-extensions-basic-setup@4.19.6" has unmet peer dependency "@codemirror/search@>=6.0.0".
warning "@uiw/react-codemirror > @uiw/codemirror-extensions-basic-setup@4.19.6" has unmet peer dependency "@codemirror/view@>=6.0.0".
warning "next > styled-jsx > @babel/plugin-syntax-jsx@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > tsutils@3.21.0" 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...
Done in 2.78s.
yarn run v1.22.19
$ next build && next export && mv out/_next out/next && sed -i '' -e 's/\/_next/\.\/next/g' out/**.html
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
info  - Checking validity of types  
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
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
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
info  - Creating an optimized production build  
info  - Compiled successfully
info  - Collecting page data  
info  - Generating static pages (3/3)
info  - Finalizing page optimization  

Page                                       Size     First Load JS
┌ ○ /                                      152 kB          223 kB
├   /_app                                  0 B            71.5 kB
└ ○ /404                                   194 B          71.7 kB
+ First Load JS shared by all              71.5 kB
  ├ chunks/framework-91d7f78b5b4003c8.js   42 kB
  ├ chunks/main-d98b4a7f39fdfc80.js        28.2 kB
  ├ chunks/pages/_app-9cd1d19dd7237c4c.js  493 B
  ├ chunks/webpack-49b6f2937c9ce9f4.js     838 B
  └ css/8d6a0d7224211b30.css               2.95 kB

○  (Static)  automatically rendered as static HTML (uses no initial props)

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
info  - using build directory: /home/daniel/Documents/git/minimal-twitter/popup/.next
info  - Copying "static build" directory
info  - No "exportPathMap" found in "undefined". Generating map from "./pages"
info  - Launching 15 workers
info  - Exporting (2/2)
Export successful. Files written to /home/daniel/Documents/git/minimal-twitter/popup/out
sed: can't read : No such file or directory
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ghost commented 1 year ago

Thanks for the report @dangpzanco, I removed the bash script and replaced it with Node.js script: https://github.com/typefully/minimal-twitter/commit/abfa890eed964e1698f344b7e68ca717907b682d. Also upgraded, thanks for the suggestion!

ghost commented 1 year ago

Feel free to re-open this if you try again and still running into issues