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

Bug-Error: level 2 optimization of clean-css #3909

Closed
massoudmaboudi opened this issue Dec 12, 2020 · 2 comments
Closed

Bug-Error: level 2 optimization of clean-css #3909

massoudmaboudi opened this issue Dec 12, 2020 · 2 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution closed: duplicate This issue or pull request already exists in another issue or pull request

Comments

@massoudmaboudi
Copy link
Contributor

🐛 Bug Report

I want to change the default font for the body in a custom CSS file. It works in dev but not production and gives an error regarding level 2 optimization of clean-css

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

(Write your steps here:)

  • Add the below code in the custom CSS file (/src/css/custom.css)
/* nunito-sans-regular - latin */
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  src: url("/fonts/nunito-sans-v6-latin/nunito-sans-v6-latin-regular.eot"),
    /* IE9 Compat Modes */
      url("/fonts/nunito-sans-v6-latin/nunito-sans-v6-latin-regular.eot?#iefix")
      format("embedded-opentype"),
    /* IE6-IE8 */
      url("/fonts/nunito-sans-v6-latin/nunito-sans-v6-latin-regular.woff2")
      format("woff2"),
    /* Super Modern Browsers */
      url("/fonts/nunito-sans-v6-latin/nunito-sans-v6-latin-regular.woff")
      format("woff"),
    /* Modern Browsers */
      url("/fonts/nunito-sans-v6-latin/nunito-sans-v6-latin-regular.ttf")
      format("truetype"),
    /* Safari, Android, iOS */
      url("/fonts/nunito-sans-v6-latin/nunito-sans-v6-latin-regular.svg#NunitoSans")
      format("svg"); /* Legacy iOS */
}
  • Add the below code in the custom CSS file (/src/css/custom.css)
body {
  font-family: "Nunito Sans";
}
  • Add the fonts to the directory (/static/fonts/nunito-sans-v6-latin/)

  • 'npm run start'

  • 'npm run build'

Expected behavior

  • 'npm run start' works well.
  • 'npm run build' works well.

Actual Behavior

  • 'npm run start' works well.
  • 'npm run build' through the below error:

image

image

.npm/_logs/2020-12-12T09_43_04_149Z-debug.log

0 verbose cli [
0 verbose cli   '/usr/local/Cellar/node/15.3.0/bin/node',
0 verbose cli   '/usr/local/bin/npm',
0 verbose cli   'run',
0 verbose cli   'build'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
5 timing config:load:builtin Completed in 2ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/Users/massoudmaboudi/Desktop/datagir/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/Users/massoudmaboudi/.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 10ms
19 verbose npm-session 6be49df99db7a28d
20 timing npm:load Completed in 22ms
21 timing command:run-script Completed in 16018ms
22 verbose stack Error: command failed
22 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
22 verbose stack     at ChildProcess.emit (node:events:376:20)
22 verbose stack     at maybeClose (node:internal/child_process:1055:16)
22 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)
23 verbose pkgid [email protected]
24 verbose cwd /Users/massoudmaboudi/Desktop/datagir
25 verbose Darwin 20.1.0
26 verbose argv "/usr/local/Cellar/node/15.3.0/bin/node" "/usr/local/bin/npm" "run" "build"
27 verbose node v15.3.0
28 verbose npm  v7.0.14
29 error code 1
30 error path /Users/massoudmaboudi/Desktop/datagir
31 error command failed
32 error command sh -c docusaurus build
33 verbose exit 1

Your Environment

  • Docusaurus version used: 2.0.0-alpha.69
  • Environment name and version (e.g. Chrome 87.0.4280.88, Node.js 15.3.0):
  • Operating system and version (desktop or mobile): MacOS BigSur
@massoudmaboudi massoudmaboudi added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Dec 12, 2020
@massoudmaboudi
Copy link
Contributor Author

Similar to #3836

@bravo-kernel
Copy link
Contributor

Confirming exact same issue.

@Josh-Cena Josh-Cena added closed: duplicate This issue or pull request already exists in another issue or pull request and removed status: needs triage This issue has not been triaged by maintainers labels Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution closed: duplicate This issue or pull request already exists in another issue or pull request
Projects
None yet
Development

No branches or pull requests

3 participants