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

netlify deploy seems to upload to many files #1297

Closed
meziantou opened this issue Sep 29, 2020 · 5 comments
Closed

netlify deploy seems to upload to many files #1297

meziantou opened this issue Sep 29, 2020 · 5 comments
Labels
area: command: deploy type: bug code to address defects in shipped code

Comments

@meziantou
Copy link

meziantou commented Sep 29, 2020

Describe the bug

I'm deploying my website using the command line netlify deploy. The output seems weird in the number of files to upload.

Deploy path: /home/vsts/work/1/xxx
Deploying to main site URL...
- Hashing files...
✔ Finished hashing 3967 files
- CDN diffing files...
✔ CDN requesting 461 files
- Uploading 2024 files
✔ Finished uploading 2024 assets
- Waiting for deploy to go live...
✔ Deploy is live!

Logs:              https://app.netlify.com/sites/xxx/deploys/xxx
Unique Deploy URL: https://xxx.netlify.app
Website URL:       https://xxx

The CDN requests 461 files but the client uploads 2024 files. Is it normal?

Expected behavior

It only uploads the files requested by the CDN

@meziantou meziantou added the type: bug code to address defects in shipped code label Sep 29, 2020
@erezrokah
Copy link
Contributor

Hi @meziantou, can you share a repo/folder structure/configuration?

@meziantou
Copy link
Author

Command line (PowerShell Core executed in Azure Pipelines):

netlify deploy --site=xxx '--dir=xxx' --message 'Build $(Build.BuildNumber) - $(Build.SourceVersion)' --prod --auth '$(Netlify_Auth)'

Folder structure:

netlify.toml
index.htm
... lots of htm and img files
... a few folders containing html, img, zip files

netlify.toml

[[redirects]]
  from = "https://xxx.netlify.app/*"
  to = "https://yyy/:splat"
  force = true
  status = 301

[[redirects]]
  from = "/*"
  to = "/404.htm"
  status = 404

[[headers]]
  for = "/*"
  [headers.values]
    strict-transport-security = "max-age=10368000"
    referrer-policy = "no-referrer-when-downgrade"
    x-content-type-options = "nosniff"
    x-frame-options = "DENY"
    x-permitted-cross-domain-policies = "none"
    x-xss-protection = "1; mode=block"
    Expect-CT = "max-age=0, enforce, report-uri=\"https://xxx.report-uri.com/r/d/ct/enforce\""

Do you need more info?

@erezrokah
Copy link
Contributor

This might be related to a recent change aligning the CLI with how our buildbot ignore files to deploy #1272

Can you also share the CLI version you're using? You can do it by running:

npx envinfo --system --binaries --npmPackages netlify-cli --npmGlobalPackages netlify-cli

@meziantou
Copy link
Author

I can't run this command line right now on my CI environment. Here's the info I already have:

npm@6.14.6 
node@v10.22.1 linux x64
netlify-cli@2.64.1

npm install -g netlify-cli:

/opt/hostedtoolcache/node/10.22.1/x64/bin/npm install -g netlify-cli

npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
> yarn@1.22.10 preinstall /opt/hostedtoolcache/node/10.22.1/x64/lib/node_modules/netlify-cli/node_modules/yarn
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/netlify-cli/node_modules/rollup/node_modules/fsevents):
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})


/opt/hostedtoolcache/node/10.22.1/x64/bin/ntl -> /opt/hostedtoolcache/node/10.22.1/x64/lib/node_modules/netlify-cli/bin/run
/opt/hostedtoolcache/node/10.22.1/x64/bin/netlify -> /opt/hostedtoolcache/node/10.22.1/x64/lib/node_modules/netlify-cli/bin/run

> netlify-cli@2.64.1 postinstall /opt/hostedtoolcache/node/10.22.1/x64/lib/node_modules/netlify-cli
> node ./scripts/postinstall.js


Success! Netlify CLI has been installed!

Your device is now configured to use Netlify CLI to deploy and manage your Netlify sites.

Next steps:

  netlify init     Connect or create a Netlify site from current directory
  netlify deploy   Deploy the latest changes to your Netlify site

For more information on the CLI run netlify help
Or visit the docs at https://cli.netlify.com

+ netlify-cli@2.64.1
added 1204 packages from 585 contributors in 32.301s

Is it enough or does your command line provide additional useful information?

@sarahetter
Copy link
Contributor

Closing as stale. Please re-open if needed

@sarahetter sarahetter closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: command: deploy type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

3 participants