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

No match URL error occurs. (CloudFlare Pages) #9107

Closed
kyoya0819 opened this issue Mar 22, 2024 · 2 comments
Closed

No match URL error occurs. (CloudFlare Pages) #9107

kyoya0819 opened this issue Mar 22, 2024 · 2 comments

Comments

@kyoya0819
Copy link

kyoya0819 commented Mar 22, 2024

Reproduction

Site: remix-20240322.pages.dev
Code: https://github.com/kyoya0819/remix-20240322

System Info

Local

  System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1 Pro
    Memory: 91.17 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/.nodebrew/current/bin/node
    Yarn: 1.22.19 - ~/.nodebrew/current/bin/yarn
    npm: 10.1.0 - ~/.nodebrew/current/bin/npm
    bun: 1.0.2 - ~/.bun/bin/bun
  Browsers:
    Chrome: 123.0.6312.58
    Safari: 17.0

Used Package Manager

yarn

Expected Behavior

The CSS styling is applied.

Photo when running yarn dev.
image

Actual Behavior

CloudFlare Pages Function are unable to load all files in the client/assets directory.

image image
Access Log
  "logs": [
    {
      "message": [
        "Error: No route matches URL \"/favicon.ico\""
      ],
      "level": "error",
      "timestamp": 1711092816084
    },
    {
      "message": [
        "No routes matched location \"/favicon.ico\" "
      ],
      "level": "warn",
      "timestamp": 1711092816084
    },
    {
      "message": [
        "[object Object]"
      ],
      "level": "error",
      "timestamp": 1711092816084
    }
  ],
CloudFlare Configs image image
Deploy Log
2024-03-22T07:22:53.407558Z	Cloning repository...
2024-03-22T07:22:54.575961Z	From https://github.com/kyoya0819/remix-20240322
2024-03-22T07:22:54.576419Z	 * branch            2df6e12ae26319f7e5dff92a7ff878c4db102bca -> FETCH_HEAD
2024-03-22T07:22:54.576517Z	
2024-03-22T07:22:54.620309Z	HEAD is now at 2df6e12 wip
2024-03-22T07:22:54.620996Z	
2024-03-22T07:22:54.703525Z	
2024-03-22T07:22:54.704049Z	Using v2 root directory strategy
2024-03-22T07:22:54.728681Z	Success: Finished cloning repository files
2024-03-22T07:22:55.53058Z	Detected the following tools from environment: nodejs@20.5.1, yarn@3.6.3
2024-03-22T07:22:55.531192Z	Installing nodejs 20.5.1
2024-03-22T07:22:55.610318Z	nodejs 20.5.1 is already installed
2024-03-22T07:22:56.501643Z	Preparing yarn@3.6.3 for immediate activation...
2024-03-22T07:22:56.933921Z	Installing project dependencies: yarn
2024-03-22T07:22:57.952058Z	➤ YN0000: · Yarn 4.1.1
2024-03-22T07:22:57.961899Z	➤ YN0000: ┌ Resolution step
2024-03-22T07:22:58.12082Z	➤ YN0000: └ Completed
2024-03-22T07:22:58.121932Z	➤ YN0000: ┌ Post-resolution validation
2024-03-22T07:22:58.122444Z	➤ YN0002: │ hp-vite@workspace:. doesn't provide postcss (p2dfcc), requested by postcss-scss.
2024-03-22T07:22:58.122873Z	➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
2024-03-22T07:22:58.157484Z	➤ YN0000: └ Completed
2024-03-22T07:22:58.1578Z	➤ YN0000: ┌ Fetch step
2024-03-22T07:23:04.042938Z	➤ YN0013: │ 866 packages were added to the project (+ 359.57 MiB).
2024-03-22T07:23:04.043635Z	➤ YN0000: └ Completed in 5s 886ms
2024-03-22T07:23:04.080647Z	➤ YN0000: ┌ Link step
2024-03-22T07:23:08.012958Z	➤ YN0007: │ esbuild@npm:0.17.6 must be built because it never has been before or the last one failed
2024-03-22T07:23:08.013755Z	➤ YN0007: │ esbuild@npm:0.19.12 must be built because it never has been before or the last one failed
2024-03-22T07:23:08.014016Z	➤ YN0007: │ workerd@npm:1.20240304.0 must be built because it never has been before or the last one failed
2024-03-22T07:23:08.014115Z	➤ YN0007: │ esbuild@npm:0.17.19 must be built because it never has been before or the last one failed
2024-03-22T07:23:08.458364Z	➤ YN0000: └ Completed in 4s 378ms
2024-03-22T07:23:08.543307Z	➤ YN0000: · Done with warnings in 10s 592ms
2024-03-22T07:23:08.733109Z	Executing user command: npm run build
2024-03-22T07:23:09.653247Z	
2024-03-22T07:23:09.653474Z	> build
2024-03-22T07:23:09.653583Z	> remix vite:build
2024-03-22T07:23:09.653653Z	
2024-03-22T07:23:11.329841Z	�[36mvite v5.1.5 �[32mbuilding for production...�[36m�[39m
2024-03-22T07:23:11.371469Z	transforming...
2024-03-22T07:23:12.418964Z	�[32m✓�[39m 85 modules transformed.
2024-03-22T07:23:12.488526Z	rendering chunks...
2024-03-22T07:23:12.552265Z	computing gzip size...
2024-03-22T07:23:12.562628Z	�[2mdist/client/�[22m�[32m.vite/manifest.json              �[39m�[1m�[2m  1.09 kB�[22m�[1m�[22m�[2m │ gzip:  0.32 kB�[22m
2024-03-22T07:23:12.562825Z	�[2mdist/client/�[22m�[2massets/�[22m�[35m_index-_lFxWn0g.css       �[39m�[1m�[2m  0.08 kB�[22m�[1m�[22m�[2m │ gzip:  0.08 kB�[22m
2024-03-22T07:23:12.562998Z	�[2mdist/client/�[22m�[2massets/�[22m�[35mapp-B6subm7q.css          �[39m�[1m�[2m  0.82 kB�[22m�[1m�[22m�[2m │ gzip:  0.50 kB�[22m
2024-03-22T07:23:12.563099Z	�[2mdist/client/�[22m�[2massets/�[22m�[36m_index-BuatSKT0.js        �[39m�[1m�[2m  0.29 kB�[22m�[1m�[22m�[2m │ gzip:  0.22 kB�[22m
2024-03-22T07:23:12.563231Z	�[2mdist/client/�[22m�[2massets/�[22m�[36mroot-6l7C66oL.js          �[39m�[1m�[2m  1.52 kB�[22m�[1m�[22m�[2m │ gzip:  0.89 kB�[22m
2024-03-22T07:23:12.563358Z	�[2mdist/client/�[22m�[2massets/�[22m�[36mjsx-runtime-BlSqMCxk.js   �[39m�[1m�[2m  8.09 kB�[22m�[1m�[22m�[2m │ gzip:  3.05 kB�[22m
2024-03-22T07:23:12.563453Z	�[2mdist/client/�[22m�[2massets/�[22m�[36mentry.client-Cnfe980b.js  �[39m�[1m�[2m 14.06 kB�[22m�[1m�[22m�[2m │ gzip:  5.01 kB�[22m
2024-03-22T07:23:12.563544Z	�[2mdist/client/�[22m�[2massets/�[22m�[36mcomponents-uA9UXrr3.js    �[39m�[1m�[2m212.90 kB�[22m�[1m�[22m�[2m │ gzip: 68.84 kB�[22m
2024-03-22T07:23:12.563656Z	�[32m✓ built in 1.21s�[39m
2024-03-22T07:23:12.65928Z	�[36mvite v5.1.5 �[32mbuilding SSR bundle for production...�[36m�[39m
2024-03-22T07:23:12.66189Z	transforming...
2024-03-22T07:23:12.696221Z	�[32m✓�[39m 10 modules transformed.
2024-03-22T07:23:12.7052Z	rendering chunks...
2024-03-22T07:23:12.706909Z	�[2mdist/server/�[22m�[32m.vite/manifest.json               �[39m�[1m�[2m0.33 kB�[22m�[1m�[22m
2024-03-22T07:23:12.707069Z	�[2mdist/server/�[22m�[2massets/�[22m�[35mserver-build-_lFxWn0g.css  �[39m�[1m�[2m0.08 kB�[22m�[1m�[22m
2024-03-22T07:23:12.707198Z	�[2mdist/server/�[22m�[2massets/�[22m�[35mapp-B6subm7q.css           �[39m�[1m�[2m0.82 kB�[22m�[1m�[22m
2024-03-22T07:23:12.70733Z	�[2mdist/server/�[22m�[36mindex.js                          �[39m�[1m�[2m4.20 kB�[22m�[1m�[22m
2024-03-22T07:23:12.708455Z	�[32m✓ built in 48ms�[39m
2024-03-22T07:23:12.747226Z	Finished
2024-03-22T07:23:12.747802Z	Found Functions directory at /functions. Uploading.
2024-03-22T07:23:13.919652Z	✨ Compiled Worker successfully
2024-03-22T07:23:13.964789Z	Validating asset output directory
2024-03-22T07:23:14.601983Z	Deploying your site to Cloudflare's global network...
2024-03-22T07:23:18.744686Z	Uploading... (7/10)
2024-03-22T07:23:19.164031Z	Uploading... (8/10)
2024-03-22T07:23:19.176806Z	Uploading... (9/10)
2024-03-22T07:23:19.312516Z	Uploading... (10/10)
2024-03-22T07:23:19.312821Z	✨ Success! Uploaded 3 files (7 already uploaded) (1.03 sec)
2024-03-22T07:23:19.312988Z	
2024-03-22T07:23:19.722797Z	✨ Upload complete!
2024-03-22T07:23:21.764189Z	Success: Assets published!
2024-03-22T07:23:26.720537Z	Success: Your site was deployed!
@mw10013
Copy link

mw10013 commented Mar 22, 2024

Following this PR seemed to fix a 404 asset problem in prod for me:

#8722

kyoya0819 added a commit to kyoya0819/remix-20240322 that referenced this issue Mar 22, 2024
@kyoya0819
Copy link
Author

Thank you for the information!
I tried it, but the result remains unchanged.

However, upon further investigation based on the hint you provided, it seems there may be an error in the configuration of the public directory.

I had set the default setting, build (in my case, dist), as the publicDir, but I realized that it should actually be build/client.
My apologies for the confusion.

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

No branches or pull requests

2 participants