Giter Site home page Giter Site logo

Bundle size is NaN about bundlephobia HOT 11 CLOSED

Kelin2025 avatar Kelin2025 commented on July 26, 2024 2
Bundle size is NaN

from bundlephobia.

Comments (11)

Raiondesu avatar Raiondesu commented on July 26, 2024 2

This is not an issue with any particular package.
This seems to be somehow true for all packages that are not cached or something...

Try
https://bundlephobia.com/[email protected]
https://bundlephobia.com/result?p=tuex
or any not-so-very-popual package.
All those have NaN as their size now.

P.S. I don't know, maybe there are some maintenance works anyway, as this wasn't the case couple of days ago.

from bundlephobia.

Kelin2025 avatar Kelin2025 commented on July 26, 2024 1

So, maybe we need to display some message instead of NaN?

from bundlephobia.

pastelsky avatar pastelsky commented on July 26, 2024 1

from bundlephobia.

leonardosnt avatar leonardosnt commented on July 26, 2024

The API is also returning a weird json response: https://bundlephobia.com/api/size?package=tuex

from bundlephobia.

Raiondesu avatar Raiondesu commented on July 26, 2024

Wow, API seems to take forever to resolve the request.
@leonardosnt, response seems to be the result of string-splitting the original API response.
@pastelsky, this can't be right, right?

from bundlephobia.

Raiondesu avatar Raiondesu commented on July 26, 2024

After some digging, I have put the original response together, which seems to be a some html-template language snippet:

<script type="text/template" id="template-app-window">
  <div id="json-viewer" class="folder-frame">
    <div class="wrapper"></div>
  </div>
</script>



<script type="text/template" id="template-folder-pane">
  <div class="wrapper scrollable-vertical">
    <ul class="folder-item-list"></ul>
  </div>
  <i class="resize-handler"></i>
</script>



<script type="text/template" id="template-folder-item">
  <li class="folder-item">
    <div class="json-property">
      <div class="json-keyname"></div>
      <div class="json-value"></div>
    </div>
  </li>
</script>



<script type="text/template" id="template-path-bar">
  <ol class="breadcrumb-list"></ol>
</script>



<script type="text/template" id="template-path-bar-item">
  <% var path; %>
  <% var cls = ['breadcrumb-item']; %>
  <% var selected; if (selected) cls.push('selected'); %>
  <% var root; if (root) cls.push('root_item'); %>
  <% cls = cls.join(' '); %>
  <li class="<%= cls %>">
    <% if (selected) { %>
      <span><%= key %></span>
    <% } else { %>
      <a href="#<%= path %>"><%= key %></a>
    <% } %>
  </li>
</script>



<script type="text/template" id="template-search-bar">
  <input type="search" name="searchbox" placeholder="Find">
  <span class="search-status"></span>
</script>

Looks like the server gives some file as a response to the API request, instead of piping the response to the app itself.

After even more digging it turned out that the API itself returns the file above chunked symbol-by-symbol in an object instead of the bundle's size:

{"0":"<","1":"!","2":"D","3":"O","4":"C","5":"T","6":"Y","7":"P","8":"E", ..., :"m","33453":"l","33454":">","scoped":false,"name":"tuex","version":"0.3.15"}

@Kelin2025, surething it should work that way. But it doesn't, for some reason.

from bundlephobia.

Raiondesu avatar Raiondesu commented on July 26, 2024

The response file is named "template.html", by the way.

from bundlephobia.

pastelsky avatar pastelsky commented on July 26, 2024

from bundlephobia.

Raiondesu avatar Raiondesu commented on July 26, 2024

At the end of the day, the problem still persists...
d

from bundlephobia.

Kelin2025 avatar Kelin2025 commented on July 26, 2024

So, it still happens. Is this problem on now.sh side?

from bundlephobia.

pastelsky avatar pastelsky commented on July 26, 2024

from bundlephobia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.