These are chat archives for canjs/canjs

13th
Dec 2018
Frank Lemanschik
@frank-dspeed
Dec 13 2018 04:37
npm update can
npm uninstall steal-stache
i don't understand how can is a steal plugin
can is the package that includes the can all build i think
is there something missing?
Kevin Phillips
@phillipskevin
Dec 13 2018 14:55
that tells steal to read can's package.json
Frank Lemanschik
@frank-dspeed
Dec 13 2018 14:56
ah
and there is the magic?
:D i will watch into that thanks for the info
Kevin Phillips
@phillipskevin
Dec 13 2018 14:56
and can's package.json has "plugins": [ "steal-stache" ]
Frank Lemanschik
@frank-dspeed
Dec 13 2018 14:57
when i add a other package to plugins section of my main package
will steal load all plugins listed in that sub package?
Kevin Phillips
@phillipskevin
Dec 13 2018 14:57
yes
Frank Lemanschik
@frank-dspeed
Dec 13 2018 14:57
oh this is good and bad
is that documented anywhere?
i readed steal and steal-tools docs a lot and found that info no where
i think then it gets time to start a Proposal again for excluding sub plugins that are evil
if you want to have a discussion about it, should probably move it to https://gitter.im/stealjs/steal
Frank Lemanschik
@frank-dspeed
Dec 13 2018 15:01
discussion is not needed at present first i need to write a example that blows up some stuff thanks for the info i was not aware of that and in StealJS.Configuration i don't found anything that tells me that the package.json of a plugin can load additional plugins
but as always if you say it is working this way i will simply try it :)
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 15:10
Hi
I'm having issues of two different versions of can-dom-data-state
How do I know which are the packages that are bringing the conflicting versions of can-dom-data-state?
Error: You can't have two versions of can-dom-data-state, check your dependencies
        at Object.eval (can-dom-data-state.js:82)
        at eval (can-dom-data-state.js:87)
        at eval (can-dom-data-state.js:87)
Kevin Phillips
@phillipskevin
Dec 13 2018 15:10
npm ls can-dom-data-state
if you're on the latest
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 15:13
I'm using individual packages
Does this steal configuration also applies in this case?
I have this on my package.json:
    "plugins": [
      "steal-stache",
      "steal-less",
      "steal-css",
      "steal-svg"
    ],
Kevin Phillips
@phillipskevin
Dec 13 2018 15:14
no
unless you're pinning your dependencies (like "can-stache-bindings": "4.8.0"), but not pinning steal-stache ("steal-stache": "^4.1.2")
either way though, you probably just need to delete your node_modules and any package lock file and re-install
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 15:19
I'm using the latest can-util@3.14.0 version and it uses a previous version from of can-dom-data-state@0.2.0
Anyway I'm trying to remove the node_modules and npm-shrinkwrap.json file and do npm install
Let's see if it works
Kevin Phillips
@phillipskevin
Dec 13 2018 15:22
we never updated can-util to use newer can-dom-data-state, but we aren't using any of the can-util/dom packages that import it
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 16:24
I'm still having issues, even after removing node_modules and npm-shrinkwrap.json
When I run npm ls can-dom-data-state I get this:
├─┬ can-attribute-observable@1.2.1
│ └── can-dom-data-state@1.0.5  deduped
├─┬ can-component@4.4.10
│ └── can-dom-data-state@1.0.5  deduped
├─┬ can-connect@2.1.0
│ └─┬ can-view-import@4.2.0
│   └── can-dom-data-state@1.0.5  deduped
├── can-dom-data-state@1.0.5 
├─┬ can-stache@4.15.12
│ └── can-dom-data-state@1.0.5  deduped
├─┬ can-stache-bindings@4.8.0
│ └── can-dom-data-state@1.0.5  deduped
└─┬ can-util@3.14.0
  ├── can-dom-data-state@0.2.0 
  ├─┬ can-event-dom-enter@1.0.4
  │ └── can-dom-data-state@0.2.0  deduped
  └─┬ can-event-dom-radiochange@1.0.5
    └── can-dom-data-state@0.2.0  deduped
Kevin Phillips
@phillipskevin
Dec 13 2018 16:26
can you check what is importing from can-util/dom
either search your project
or you can use System._traceData.parentMap if you're using steal
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 16:28
Currently I'm not using any can-util/dom
How do I use System._traceData.parentMap?
Kevin Phillips
@phillipskevin
Dec 13 2018 16:28
once your app is loaded, you can type that in the devtools console
and look for can-dom-data-state@0.2.0
it should show you the modules that load it
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 16:31
I have this:
image.png
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 16:45
Could it be related with can-event?
It seems that it depends on can-util/dom
Matthew Phillips
@matthewp
Dec 13 2018 16:46
yes, you dont need can-event in a canjs 4/5 app
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 16:51
It was the usage of can-event/batch/batch
I'm working on a branch to upgrade the application to canjs@4 and on the rebase to get the latest changes I've forgot to change this
Is there any guide how to debug this kind of conflicts?
It happens once in a while when we upgrade some can dependency
Gregg Roemhildt
@roemhildtg
Dec 13 2018 16:56
I delete the package-lock.json and the node_modules. Then npm i
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 18:13
In my case it wasn't the solution
I had to analyse the System._traceData.parentMap information in order to understand why there were two different versions of can-dom-data-state being imported
Ivo Pinheiro
@ivospinheiro
Dec 13 2018 18:39
I have a question in can-connect/contructor/store
Should in this case be used canBatch?
https://github.com/canjs/can-connect/blob/4f284fc8b9026767e7cf0f69968a94319b559f13/constructor/store/store.js#L524-L533
Justin Meyer
@justinbmeyer
Dec 13 2018 18:45
@ivospinheiro maybe ... is updatedInstance not already in a batch?
store is really supposed to mostly ignorant of canjs ... it's possible that hydrateInstance should be overwritten in can-connect/can/map
though I think queues is probably ok for store to know about