You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After spending an entire day finally figured out that this was the reason why the specs failed mysteriously on my setup but were working in your repo's CI.
The code written to parse this value from .env file sets the value to true even if it is given as false. E.g. in the .env.example file provided with the code -
A workaround is to remove the line from .env file.
Although this looks innocent, it breaks Neode for two reasons:
The code is always assuming query results to be in neo4j high-precision number format. With disableLosslessIntegers true, all the places where get is being invoked fails because neo4j returns plain numbers which don't have this method.
The code written to parse this value from
.env
file sets the value to true even if it is given as false. E.g. in the.env.example
file provided with the code -This will still be converted to
disableLosslessIntegers:true
in the parsing logic present at https://github.com/adam-cowley/neode/blob/master/src/index.js#L74,because
false
ortrue
values are strings inprocess.env
so!!value
will always be true.A workaround is to remove the line from
.env
file.Although this looks innocent, it breaks Neode for two reasons:
disableLosslessIntegers
true, all the places whereget
is being invoked fails because neo4j returns plain numbers which don't have this method.10
becomes10.0
and the query is no longer able to match the nodes and relation creation fails silently. An exception is thrown by https://github.com/adam-cowley/neode/blob/master/src/Services/RelateTo.js#L45 which is expectingrecords[0]
to be present.I would suggest disabling this mode completely till the relevant code is fixed. Two changes need to be done:
NEO4J_DISABLE_LOSSLESS_INTEGERS=false
line fromenv.example
so people (like yours truly) don't inadvertently copy that into their setup.disableLosslessIntegers
from config till the code is fixed.The text was updated successfully, but these errors were encountered: