Giter Club home page Giter Club logo

Comments (16)

jadjoubran avatar jadjoubran commented on June 15, 2024

Hi @Neoares
thanks for opening the issue
Are you using git? we can easily check what happened if you had a commit before upgrading
if so, can you please run git diff and check what has changed?

from webdash.

jadjoubran avatar jadjoubran commented on June 15, 2024

when you upgrade through webdash, you're simply running npm update {packagename} or yarn upgrade {packagename} (if you had a yarn.lock) so it should not remove packages
but I'm happy to investigate or try to replicate it

from webdash.

Neoares avatar Neoares commented on June 15, 2024

I'm using git, but haven't committed before upgrading, since I'm in a test branch. So my only diffs are the package.json, the package-lock.json, and webdash.json (as untracked file).

from webdash.

jadjoubran avatar jadjoubran commented on June 15, 2024

okay and can you show me a screenshot of git diff package.json?
mainly those with regards to webdash and react

from webdash.

Neoares avatar Neoares commented on June 15, 2024

The diff in the package.json is what I posted in the thread:

+    "webdash": "^1.2.0",
+    "webdash-npm-scripts": "^1.2.0",
+    "webdash-package-json": "^1.2.0",
+    "webdash-performance-budget": "^1.2.0",
+    "webdash-pwa-manifest": "^1.2.0",

Since I saw the 2 packages from webdash disappearing from the app, I manually checked all my packages 1 by 1, and noticed about the react ones, but I'm not sure if they were missing before the upgrade (as opposite to the webdash ones, that I 100% know they were listed in the app before the upgrade).

from webdash.

jadjoubran avatar jadjoubran commented on June 15, 2024

I saw the 2 packages from webdash disappearing from the app

so they were gone from package.json?
if so, how come they show up here in the diff?

from webdash.

Neoares avatar Neoares commented on June 15, 2024

Wait, we're talking about different things. My fault, I should've attached an image at first.

The package is still in package.json. The package is still installed correctly (I see the webdash-npm-scripts and the webdash-package-json "widgets" in the webdash app). What I'm not seeing is the packages I've mentioned in the webdash package.json list.

image

And as I said, the react and react-dom packages are also missing BUT from the list in the webdash app. There's nothing wrong with the packages itself.

from webdash.

jadjoubran avatar jadjoubran commented on June 15, 2024

ohh okay hahah
okay thanks for clarifying

can you please help me debug by following the below steps:

  1. restart webdash server, is it still an issue?
  2. can you try on another browser and check if the issue still persists?
  3. open dev tools and please show me the JSON object that you get back from /webdash-package-json/package-json

from webdash.

Neoares avatar Neoares commented on June 15, 2024
  1. Yes.
  2. Yes.
  3. This is interesting. The response from http://localhost:3456/api/package-json/package-json are all my packages except the 2 I'm not seeing in the webdash app BUT I'm actually getting the 2 packages from react that are not showing up. But there's a strange behavior in those 2 packages.

image

As you can see, the data inside every package from the API response are "version", "from", and "resolved". But in the react and react-dom ones, I'm getting "required" and "peerMissing" set to true.

So I see 2 issues here. 2 packages not being returned from API, and 2 packages being returned but not being shown in the dashboard.

from webdash.

Neoares avatar Neoares commented on June 15, 2024

Some update: I'm getting this at the very end of the npm list output:

npm ERR! peer dep missing: react@^0.14.0 || ^15.0.1, required by [email protected]
npm ERR! peer dep missing: react-dom@^0.14.0 || ^15.0.1, required by [email protected]

I guess it has something to do with that.

from webdash.

jadjoubran avatar jadjoubran commented on June 15, 2024

yeah.. so this makes me feel that react is not installed.. is it?
you can check by running this for example ls node_modulles/react or ls node_modules and checking for a react folder

from webdash.

jadjoubran avatar jadjoubran commented on June 15, 2024

actually the problem is that you don't have react in your package.json
but you have react-slick
and react is a peer dependency of react-slick
so the only solution would be to npm install react (not sure which version) and save it as a dependency

or alternatively, if you don't plan on using react-slick you can simply uninstall it with a --save (or --save-dev)

Let me know if that works for you

from webdash.

Neoares avatar Neoares commented on June 15, 2024

They are installed, at version 16.0. The problem above is that react-slick asks for react 14 or 15, but not 16. So maybe my react-slick is not working properly, but react definitely does.

from webdash.

jadjoubran avatar jadjoubran commented on June 15, 2024

ah makes sense
okay, so it seems when you satisfy this peer dependency it should work
but let's keep this open until we make sure it's fixed

from webdash.

Neoares avatar Neoares commented on June 15, 2024

Update: it may be a bug in my npm or something, because npm list | grep react gives me this:

├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
├─┬ UNMET PEER DEPENDENCY [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
├─┬ UNMET PEER DEPENDENCY [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ ├── [email protected]
├─┬ [email protected]
│ ├── [email protected] deduped
├─┬ [email protected]
│ └─┬ [email protected]
npm ERR! peer dep missing: react@^0.14.0 || ^15.0.1, required by [email protected]
npm ERR! peer dep missing: react-dom@^0.14.0 || ^15.0.1, required by [email protected]

But as I said, react and react-dom packages are working perfectly. I'll have to take a look because I don't know what's happening. If your app is relying on npm list then is definitely not a bug in your code :)

from webdash.

jadjoubran avatar jadjoubran commented on June 15, 2024

yes indeed, I simply run npm list --depth=0 --json --silent
source

I'm going to close this issue but feel free to update it with your findings
Thanks 😄

from webdash.

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.