These are chat archives for canjs/canjs

8th
May 2017
Justin Meyer
@justinbmeyer
May 08 2017 14:16
@web-mech did you ever get your build stuff figured out? I know @chasenlehara did another release.
Juan Orozco
@Macrofig
May 08 2017 15:11
@eben-roux So, sorry for the confusion on the can-validate suite. Let me know if you're still running into issues. The can-validate project has a method formatErrors that will help you with converting errors into the format you need. (Also, the docs are incorrect, I'm going to create a PR for that today)
Gregg Roemhildt
@roemhildtg
May 08 2017 15:55
Hey all, I'm wondering if anyone uses any debugging tools for canjs? Something like this? https://github.com/timstuyckens/chromeextensions-knockoutjs
Michael Price
@web-mech
May 08 2017 15:56
@justinbmeyer for can-compile yes. The issue was sorted out.
Kevin Phillips
@phillipskevin
May 08 2017 16:00
@roemhildtg some people were working on a similar tool for canjs, but I’m not sure what state it is in
we’re making a lot of changes to canjs internals to make this kind of tool a lot easier to create
Gregg Roemhildt
@roemhildtg
May 08 2017 16:02
Cool! It doesn't seem like it would be too difficult to get some basic functionality. Basically import can-view-model and call it when an element is inspected...log the output
DaveO
@DaveO-Home
May 08 2017 16:06
Say canjs team,
I moved from canjs 3.5.1 to 3.6 and had these two issues....
  1. got this error: "You can't have two versions of can-event/batch/batch, check your dependencies" (node_modules/can/node_modules/can-event/batch/batch.js:587:8). I'm using the latest steal.
  2. When executing production(steal-tools bundle) I have to arbitrarily add "can/util" to steal, steal(...,"can/util", function...). Is this expected?(I actually get a slightly smaller footprint for production).
    How do I resolve the dependency problem?
Kevin Phillips
@phillipskevin
May 08 2017 16:07
@DaveO-Home try running npm ls can-event
to see where the second one is coming from
DaveO
@DaveO-Home
May 08 2017 16:09
I get this: can@3.6.0
│ ├─┬ can-control@3.0.10
│ │ └── can-event@3.0.2
│ ├─┬ can-ejs@3.0.7
│ │ ├─┬ can-compute@3.0.10
│ │ │ └── can-event@3.4.0
│ │ └─┬ can-legacy-view-helpers@0.4.4
│ │ └── can-event@3.4.0
│ ├── can-event@3.4.0
│ └─┬ can-map-define@3.0.9
│ └─┬ can-list@3.0.5
│ └── can-event@3.4.0
└─┬ can-connect@1.3.11
└── can-event@3.4.0
Brad Momberger
@bmomberger-bitovi
May 08 2017 16:09

│ ├─┬ can-control@3.0.10
│ │ └── can-event@3.0.2

is the odd one out.

DaveO
@DaveO-Home
May 08 2017 16:11
I did an update, so do I remove and install?
Brad Momberger
@bmomberger-bitovi
May 08 2017 16:12
Yes. can-control doesn't have any conflicts with the newer can-event, so removing the older one shouldn't cause errors.
Juan Orozco
@Macrofig
May 08 2017 16:27
Heyo, I need some help understanding why this is false.
var custom = new set.Algebra(set.props.id('_id'), set.props.offsetLimit('$skip', '$limit'));

custom.has({
  "$skip": 0,
  "$limit": 10,
},{
  "_id": 0,
  "name": "heyo"
})
I feel like I'm missing something silly.
Brad Momberger
@bmomberger-bitovi
May 08 2017 16:46
Based on my reading of Algebra.prototype.has, the only thing that gets tested when you're testing $skip and $limit from the query, is having $skip and $limit on the result within the number range.
DaveO
@DaveO-Home
May 08 2017 17:13

@bmomberger-bitovi - not sure how to remove can-event@3.0.2. I removed can-control and did an ls can-control and got this:
└─┬ can@3.6.0
├─┬ can-component@3.0.7
│ └── UNMET DEPENDENCY can-control@^3.0.4
└── UNMET DEPENDENCY can-control@3.0.10

npm ERR! missing: can-control@3.0.10, required by can@3.6.0
npm ERR! missing: can-control@^3.0.4, required by can-component@3.0.7 is my install hosed? npm remove can-event@3.0.2 does nothing.

Brad Momberger
@bmomberger-bitovi
May 08 2017 17:18
do an npm install again
I meant that you could rm -rf node_modules/can-control/node_modules/can-event
but now that can-control has been cleared out, npm install should restore can-control but not reinstall the older can-event.
DaveO
@DaveO-Home
May 08 2017 17:20
I re-installed can-control, same problem...
Brad Momberger
@bmomberger-bitovi
May 08 2017 17:22
Same problem meaning?
DaveO
@DaveO-Home
May 08 2017 17:24
Doing an ls can-event the can-event@3.0.2 is still there
Frank Lemanschik
@frank-dspeed
May 08 2017 17:25
@DaveO-Home quick and dirty work around
use yarn not npm
it will fix your issues
Brad Momberger
@bmomberger-bitovi
May 08 2017 17:25
I'm with @frank-dspeed on this one.
If yarn is better at resolving this, try it
Frank Lemanschik
@frank-dspeed
May 08 2017 17:26
npm install -g yarn 
yarn install
as donejs 1.0 was in dev status
it often helped a lot
DaveO
@DaveO-Home
May 08 2017 17:26
Were are the docs on yarn?
Frank Lemanschik
@frank-dspeed
May 08 2017 17:27
not much docs needed
its like npm only better its from facebook
install it global and do yarn install inside your folder and not npm install
DaveO
@DaveO-Home
May 08 2017 17:28
So I do npm remove can first...
Frank Lemanschik
@frank-dspeed
May 08 2017 17:28
no need
use yarn add and remove
DaveO
@DaveO-Home
May 08 2017 17:28
Ok
Frank Lemanschik
@frank-dspeed
May 08 2017 17:29
you can forget npm
yarn is a complet replacment
Kevin Phillips
@phillipskevin
May 08 2017 17:44
you can fix this problem without switching to yarn
it looks like can-control and can-event are dependencies in your package.json. is that true @DaveO-Home ?
or are those under can 3.6.0?
DaveO
@DaveO-Home
May 08 2017 17:45
Yes, I did the yarn and it appears to have fixed the problem, I haven't tested the app yet.
@phillipskevin I think both are true.
Kevin Phillips
@phillipskevin
May 08 2017 17:47
ok, then you should just remove those dependencies from your package.json
DaveO
@DaveO-Home
May 08 2017 17:47
In my package.json - NO
Kevin Phillips
@phillipskevin
May 08 2017 17:48
the main can package should be all you need
DaveO
@DaveO-Home
May 08 2017 17:48
Yes, can package is all I have.
Kevin Phillips
@phillipskevin
May 08 2017 17:49
ok, then maybe all you needed was a fresh install
Frank Lemanschik
@frank-dspeed
May 08 2017 17:49
ok good to hear that yarn did it
Kevin Phillips
@phillipskevin
May 08 2017 17:49
which would explain why yarn would fix it
Frank Lemanschik
@frank-dspeed
May 08 2017 17:49
dont try to explain the magic its mystery
a secret alliance
Kevin Phillips
@phillipskevin
May 08 2017 17:50
that just isn’t true
and it makes it seem like canjs is only compatible with yarn
which is bad
Frank Lemanschik
@frank-dspeed
May 08 2017 17:51
ok DaveO try to delete node_modules please and re install with npm
DaveO
@DaveO-Home
May 08 2017 17:51
Well now I'm have other issues, map/map ??? Will have to research.
Frank Lemanschik
@frank-dspeed
May 08 2017 17:51
and look if error still exists
Kevin yarn simply solves dependencys right
Kevin Phillips
@phillipskevin
May 08 2017 17:52
that’s fine
Frank Lemanschik
@frank-dspeed
May 08 2017 17:52
and canjs had a lot of package trouble
Kevin Phillips
@phillipskevin
May 08 2017 17:52
if yarn is working, use yarn
canjs had a lot of package trouble
what does that mean?
canjs is not having these problems
Frank Lemanschik
@frank-dspeed
May 08 2017 17:53
most people don't even understand the change from can main to single modules
Kevin Phillips
@phillipskevin
May 08 2017 17:53
in this case, he’s using the main can pacakage
Frank Lemanschik
@frank-dspeed
May 08 2017 17:53
lets say there was a lot of installation trouble always
the last year
Kevin Phillips
@phillipskevin
May 08 2017 17:54
if that’s true, please open issues to fix them
not everyone can / wants to use yarn
Frank Lemanschik
@frank-dspeed
May 08 2017 17:54
to late and not worth
Kevin Phillips
@phillipskevin
May 08 2017 17:54
and I honestly don’t think it solves this problem any differently than npm
Frank Lemanschik
@frank-dspeed
May 08 2017 17:54
i am happy if current keeps stable
and working
i will forget about the time befor
and by the way the issues are fixed but that resulted in the version problems
with existing installs
most current gitrepos most times worked
and else i already posted issues and they got fixed
Kevin Phillips
@phillipskevin
May 08 2017 17:56
ok
then those issues don’t really apply when the problem is
I moved from canjs 3.5.1 to 3.6 and had these two issues
since you’re talking about issues that happened in the past… not with the most recent version
@DaveO-Home what is the usse you have now?
map/map ???
Michael Price
@web-mech
May 08 2017 17:58
that sounds like can-define/map/map
which is what you need if you are not using steal
Frank Lemanschik
@frank-dspeed
May 08 2017 17:58
ehm
you need it even with steal :)
its the main viewModel most times
but as he uses can single can/define/map/map
is right i think
kevin knows that better i never use the single package
DaveO
@DaveO-Home
May 08 2017 18:02
I did what Kevin asked, and uninstalled "can" and now reinstalling with npm. I didn't pursue the map/map problem.
It now works like a charm, thanks....
Kevin Phillips
@phillipskevin
May 08 2017 18:04
when you upgrade versions like that you should be able to just do rm -rf node_modules && npm install
to get all the latest dependencies
DaveO
@DaveO-Home
May 08 2017 18:06
I don't usually like the brute force method, but apparently that is what it takes.
DaveO
@DaveO-Home
May 08 2017 18:21
As a side note: Does anyone know how "asm.js" works with steal? I see it getting invoked lately, does steal or the browser invoke it?
Kevin Phillips
@phillipskevin
May 08 2017 18:22
might be worth asking in https://gitter.im/stealjs/steal
Frank Lemanschik
@frank-dspeed
May 08 2017 18:26
asm js gets invoced by steal
steal generates a object with named keys and then call that
DaveO
@DaveO-Home
May 08 2017 19:07
@frank-dspeed it doesn't work with Window's 10 MS Edge browser, I have to disable it by turning on the console for the app to work.
Kevin Phillips
@phillipskevin
May 08 2017 19:30
@DaveO-Home steal is tested in MS Edge, so I don’t think asm.js is a dependency of steal directly
can you try npm ls asm.js
Ivo Pinheiro
@ivospinheiro
May 08 2017 22:37
HI!
Is it possible to override can-connect "getData" function in order to get an item using as parameter the full "url", instead of query parameters?