ephigenia / ikea-availability-checker Goto Github PK
View Code? Open in Web Editor NEWCommand-Line-Script & Library for checking the availability of specific IKEA products in specific stores and/or countries.
License: MIT License
Command-Line-Script & Library for checking the availability of specific IKEA products in specific stores and/or countries.
License: MIT License
Integrate the online store api by reverse engineer the ingka API. Thereโs a proof of concept in the discussion: #36
Adding Typescript declarations would be very helpfull
Hello, would it be possible to add support to this awesome tool for the IKEA in Dublin Ireland ? The store id is 038. Thanks.
Original report from @okniazik in #100 (comment)
npx [email protected] stock --country pl 80382321
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
/Users/ephigenia/.npm/_npx/dc2879d1cfed7f18/node_modules/ikea-availability-checker/source/cli-stock.js:152
.then(results => results.filter(item => item.availability.stock >= opts.minStock))
^
TypeError: Cannot read properties of undefined (reading 'stock')
at /Users/ephigenia/.npm/_npx/dc2879d1cfed7f18/node_modules/ikea-availability-checker/source/cli-stock.js:152:65
at Array.filter (<anonymous>)
at /Users/ephigenia/.npm/_npx/dc2879d1cfed7f18/node_modules/ikea-availability-checker/source/cli-stock.js:152:32
at processTicksAndRejections (node:internal/process/task_queues:96:5)
1.0.x
branch failed. ๐จI recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโm sure you can fix this ๐ช.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the 1.0.x
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donโt help, or if this issue is reporting something you think isnโt right, you can always ask the humans behind semantic-release.
1.0.3
on branch 1.0.x
cannot be published as it is out of range.Based on the releases published on other branches, only versions within the range >=1.0.2 <1.0.3
can be published from branch 1.0.x
.
The following commit is responsible for the invalid release:
This commit should be moved to a valid branch with git merge or git cherry-pick and removed from branch 1.0.x
with git revert or git reset.
A valid branch could be master
.
See the workflow configuration documentation for more details.
Good luck with your project โจ
Your semantic-release bot ๐ฆ๐
Describe the bug
[frafra@e32 ~]$ npx ikea-availability-checker stores at | head -n5
npx: installed 20 in 1.466s
undefined
undefined
undefined
! H|H|H|H|H H__________________________________ H|ยง|ยง|ยง|H H|* * * * * *|---------------------| H|ยง|โ|ยง|H H| * * * * * |---------------------| H|ยง|ยง|ยง|H H|* * * * * *|---------------------| H|H|H|H|H H| * * * * * |---------------------| H|H|H|H|H H|---------------------------------| =============== H|---------------------------------| /| _ _ | H|---------------------------------| (| O O |) H|---------------------------------| /| U | H----------------------------------- | =/ | H _..._/ H _|I/|_ H _______/| H |/_______ H / / / H | | | / | H | ||o|| | H | | ||o|| | | H | | ||o|| | | H Carl Pilcher
tอฃอeอชอฉsอซฬtอคฬiฬฬฬnฬอจgอฬอฆ ฬฬ าอฬฬtออeฬอsออtอฎฬiฬฬnฬฬgออ อฆอฃtอชอฌeฬฟอ าฬ ฬณฬผsฬฬtอคฬiอฌอฃฬnอฬ าฬฬgฬอค อซฬ าฬฬฬผtฬฝฬพ าอฬนฬฑeอฬsฬฬพอฃtฬฝอiอฌฬอฏnฬอgฬฬฟ ฬtฬพอeอญอsฬพฬ
ฬtอคฬiอฬ าอ อฬฬฌอnฬอฏgอออ อจอtออฎeฬอฌsอฬ าฬถฬง าฬฬอtอฬiฬฬอnฬฬgฬฬ อฏฬtฬอ าออeฬฬ าฬชอ
sฬฬอtฬฬฝiอฎอnอฬgฬอ
^C[frafra@e32 ~]$ npx ikea-availability-checker -V
npx: installed 20 in 1.484s
1.0.5
1.0.x
branch failed. ๐จI recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโm sure you can fix this ๐ช.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the 1.0.x
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donโt help, or if this issue is reporting something you think isnโt right, you can always ask the humans behind semantic-release.
1.0.3
on branch 1.0.x
cannot be published as it is out of range.Based on the releases published on other branches, only versions within the range >=1.0.2 <1.0.3
can be published from branch 1.0.x
.
The following commits are responsible for the invalid release:
Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch 1.0.x
with git revert or git reset.
A valid branch could be master
.
See the workflow configuration documentation for more details.
Good luck with your project โจ
Your semantic-release bot ๐ฆ๐
Thanks for putting this together. I apologize if I'm doing something incorrectly here but I can't seem to get this to run whenever I pass the "store" parameter, as shown in the docs. For instance, this works fine:
`% npm run start -- stock --country=ca 40413131
[email protected] start /Users/abc/projects/ikea/node_modules/ikea-availability-checker
node $npm_package_main "stock" "--country=ca" "40413131"
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโโโโโ
โ date โ countryCode โ country โ product โ storeId (buCode) โ store โ stock โ probability โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.181Z โ ca โ Canada โ 40413131 โ 414 โ Boucherville โ 144 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.176Z โ ca โ Canada โ 40413131 โ 040 โ Burlington โ 50 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.190Z โ ca โ Canada โ 40413131 โ 216 โ Calgary โ 4 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.182Z โ ca โ Canada โ 40413131 โ 313 โ Coquitlam โ 54 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.190Z โ ca โ Canada โ 40413131 โ 349 โ Edmonton โ 0 โ LOW โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.184Z โ ca โ Canada โ 40413131 โ 256 โ Etobicoke โ 40 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.182Z โ ca โ Canada โ 40413131 โ 039 โ Montreal โ 114 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.196Z โ ca โ Canada โ 40413131 โ 149 โ North York โ 152 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.178Z โ ca โ Canada โ 40413131 โ 004 โ Ottawa โ 23 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.179Z โ ca โ Canada โ 40413131 โ 003 โ Richmond โ 81 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.178Z โ ca โ Canada โ 40413131 โ 372 โ Vaughan โ 18 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโโโค
โ 2020-06-23T02:57:26.188Z โ ca โ Canada โ 40413131 โ 249 โ Winnipeg โ 73 โ HIGH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโดโโโโโโโโโโโโโโ
`
But attempting to put in the store ID for any store on the list returns an empty data set, for instance:
`% npm run start -- stock --country=ca --store=414 40413131
[email protected] start /Users/abc/projects/ikea/node_modules/ikea-availability-checker
node $npm_package_main "stock" "--country=ca" "--store=414" "40413131"
โโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโโโโโ
โ date โ countryCode โ country โ product โ storeId (buCode) โ store โ stock โ probability โ
โโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโดโโโโโโโโดโโโโโโโโดโโโโโโโโโโโโโโ
`
The issue from #111 and #113 is back :(
I seem to be having the same issue on 2.0.0-alpha.5
Command
npx ikea-availability-checker@alpha stock --country=nl 50411990
Most countries I attempted return a probability=ERR_HTTP_403:
Some countries return a probability=DEPRECATED:
Some countries still work:
At first I thought the product might be deprecated in those countries, but that is not the case. I confirmed that the product was still in stock on their website. So is seems to be pointing to something else being deprecated.
Still this does not explain the 403 errors on the other countries.
Hopefully there is a fix. If you need me to do additional testing, I'd be happy to.
Setup semantic release with
master -> channel: latest
develop -> channel: beta
next -> channel: next
It seems that all request to Belgian stores are failing with a 403. I did tested the same request using other countries (it, be, fr, de) and they worked. Not sure what the problem is.
$ ikea-availability stock --country be 70346932
/usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:114
throw new errors.IOWS2ResponseError(error);
^
IOWS2ResponseError: Unable to receive product 70346932 availability for store 482 status code: 403 undefined using url: /retail/iows/be/fr/stores/482/availability/ART/70346932
at IOWS2.fetch (/usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:114:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
nico@kit:~$ ikea-availability stock --store 423 70346932
/usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:114
throw new errors.IOWS2ResponseError(error);
^
IOWS2ResponseError: Unable to receive product 70346932 availability for store 423 status code: 403 undefined using url: /retail/iows/be/fr/stores/423/availability/ART/70346932
at IOWS2.fetch (/usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:114:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Can this also be expanded to return the online store stock? or is it only actual branch locations only?
Node.js v10 has been going out of LTS.
See stats: https://nodejs.org/metrics/summaries/version.png
there should be a breaking release using node 14 LTS
Similar to #93, All US stores are returning 403 error code starting probably a couple of days ago. Someone has already reported the same issue in that closed issue: #93 (comment)
Hi there,
Looks like not all AU stores are returned from executing ikea-availability stores au
countryCode โ country โ buCode โ name โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโค
โ au โ Australia โ 451 โ Canberra โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโค
โ au โ Australia โ 460 โ North Lakes โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโค
โ au โ Australia โ 919 โ Logan โ
Adelaide store is 557.
ikea-availability -- stock --store=557 10335192
Yet cannot hit it (no stores found), any ideas?
Describe the bug
Certain items have begun showing "Not Found" when queried via the API but when I search those items on the Ikea website they show up without issue. This is for queries to US stores. I have not checked for other countries. A week ago this issue was not occurring and was showing expected results/restock dates and projections just fine. This does not happen on all items only some. I've mainly been checking for a few still missing pieces from a Sektion Cabinet build.
To Reproduce
Steps to reproduce the behavior:
Query the availability for item number 00265533 for a US store(s). It will show not found. However if you search that item number on the Ikea US website, it shows the proper item, a 24" Utrusta shelf.
Expected behavior
Display the item results when queried via API
Screenshots
https://www.ikea.com/us/en/p/utrusta-shelf-white-00265533/
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Logging a separate issue to follow-on to my previous one, when I try to enter the country code "us", I get the following error:
`% npm run start -- stock --country=us 40413131
[email protected] start /Users/abc/projects/ikea/node_modules/ikea-availability-checker
node $npm_package_main "stock" "--country=us" "40413131"
(node:16663) UnhandledPromiseRejectionWarning: Error: Unable to receive product 40413131 availability for store 250 status code: 410.
at /Users/abc/projects/ikea/node_modules/ikea-availability-checker/source/lib/iows2.js:52:23
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 42)
(node:16663) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16663) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`
Running the same command with other country codes works fine.
Please find the attachment with the error displayed. It appears after typing this command:
npx [email protected] stock --country pl 80382321
Tell me how can I fix it, please.
It doesn't seem like this code is usable as a library. Would you consider adding the ability for this to be used as a library, as well as a CLI program?
There is a issue on french contry requests, for exemple : npx [email protected] stock --store 562 80382321
will throw an issue on buCode.
return cache[key].find(item => item.store.buCode === buCode);
^
TypeError: Cannot read properties of undefined (reading 'buCode')
at /workspace/ikea-web-checker/node_modules/ikea-availability-checker/source/lib/ingka.js:99:47
at Array.find (<anonymous>)
at IngkaApi.getStoreProductAvailability (/workspace/ikea-web-checker/node_modules/ikea-availability-checker/source/lib/ingka.js:99:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
After investigating there is a undefined store.
Is it possible to add a small verification on this find ?
return cache[key].find(item => item.store && item.store.buCode === buCode);
Describe the bug
The coordinates of the store in Karlsruhe are wrong
{ "buCode": "551", "name": "Karlsruhe", "coordinates": [ 38.925, 45.0125 ], "countryCode": "de" }
Based on Google maps the coordinates should be
8.4420776, 49.0048648
Though the storeโs buCode also defines the country the store is in the following call doesn't return any result:
npm run start -- stock --store=155 S69022537
probably caused by getStoresMatchingQuery
not returning any stores.
Describe the bug
Cannot check stock - SyntaxError
To Reproduce
Steps to reproduce the behavior:
$ ikea-availability stock --country be 30346934
/usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:232
if (err.request?.res) {
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/usr/local/lib/node_modules/ikea-availability-checker/source/cli-stock.js:8:13)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
Client (please complete the following information):
Debian Bullseye
NodeJS v12.22.5
Installed from npm
Hello,
I would very like to use this API but I have some issues:
npx ikea-availability-checker -- stores fr
it doesn't show up)npx ikea-availability-checker -- stock --country fr 20388972
) makes an error: (node:17700) UnhandledPromiseRejectionWarning: Error: Unable to receive product 20388972 availability for store 132 status code: 410 Gone.
Thanks.
Some countries like germany and Austria have also the option to pickup from Abholstations "Pickup stations". Can this be added as well?
In an age where more and more shopping happens online, I think many people will find it useful to check Home Delivery Availability.
Is there currently a way to check for Home Delivery Availability within a country? If not, would be possible to have this option added if IKEA provides this information through their endpoints?
I think this works slightly differently as some countries (GB, DE...) require a postcode to check for Home Delivery Availability.
Describe the bug
Szczecin store doesn't appear when running ikea-availability stores pl
or any other command.
To Reproduce
Steps to reproduce the behavior:
ikea-availability stores pl
Expected behavior
Szczecin store is being checked by the software
Screenshots
> ikea-availability stores pl
โโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ countryCode โ country โ buCode โ name โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 188 โ Warszawa / Janki โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 203 โ Gdaลsk โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 204 โ Krakรณw โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 205 โ Poznaล โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 294 โ Wrocลaw โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 306 โ Katowice โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 307 โ Warszawa / Targรณwek โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 311 โ Lublin โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 329 โ ลรณdลบ โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 429 โ Bydgoszcz โ
โโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ pl โ Poland โ 623 โ Warszawa / Blue City โ
โโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโ
Client (please complete the following information):
I'm wanting to buy some smart blinds and the inventory online keeps showing up as available but when you go to buy it, the website says it's out of stock. What I've noticed is that if you keep checking, more stock will become available and you are able to make the purchase. Is it possible to use this tool to check that inventory?
The cmd gives me this error "Missing script: "start"
master
branch failed. ๐จI recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโm sure you can fix this ๐ช.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donโt help, or if this issue is reporting something you think isnโt right, you can always ask the humans behind semantic-release.
The npm token configured in the NPM_TOKEN
environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/
.
If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.
Please make sure to set the NPM_TOKEN
environment variable in your CI with the exact value of the npm token.
Good luck with your project โจ
Your semantic-release bot ๐ฆ๐
Would this work for ikea germany?
next
branch failed. ๐จI recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโm sure you can fix this ๐ช.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the next
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donโt help, or if this issue is reporting something you think isnโt right, you can always ask the humans behind semantic-release.
1.0.1
on branch next
cannot be published as it is out of range.Based on the releases published on other branches, only versions within the range >=1.0.0 <1.0.1
can be published from branch next
.
The following commits are responsible for the invalid release:
Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch next
with git revert or git reset.
A valid branch could be master
or next-major
.
See the workflow configuration documentation for more details.
Good luck with your project โจ
Your semantic-release bot ๐ฆ๐
npx [email protected] stock --country pl 80382321
ERR_HTTP_403
First of all thanks a lot for this tool! It is really useful.
Describe the bug
The "Rivoli" store is missing in stores.json
.
To Reproduce
Use the following command:
ikea-availability stores store fr |grep Rivoli
Expected behavior
ikea-availability stores store fr |grep Rivoli
โ fr โ France โ 645 โ Rivoli
Possible fix
Here is the patch that I used to fix this issue:
diff --git a/source/data/stores.json b/source/data/stores.json
index fe5ff7b..4d13040 100644
--- a/source/data/stores.json
+++ b/source/data/stores.json
@@ -3289,6 +3289,15 @@
],
"countryCode": "be"
},
+ {
+ "buCode": "645",
+ "name": "Rivoli",
+ "coordinates": [
+ 2.3425746,
+ 48.8604859
+ ],
+ "countryCode": "fr"
+ },
{
"buCode": "376",
"name": "Zaventem",
Hello all,
I've installed the package within a docker container with the following settings:
To install the checker, I've used the following command npm install -g ikea-availability-checker
which gives me a warning:
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=12.0"} (current: {"node":"10.19.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
Although ikea-availability --help
outputs the correct help section of the program, ikea-availability stock at
results in an error:
_/usr/local/lib/node_modules/ikea-availability-checker/node_modules/commander/index.js:925
throw new Error(executableMissing);
^Error: 'ikea-availability-stock' does not exist
- if 'stock' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
- if the default executable name is not suitable, use the executableFile option to supply a custom name
at ChildProcess.proc.on (/usr/local/lib/node_modules/ikea-availability-checker/node_modules/commander/index.js:925:15)
at ChildProcess.emit (events.js:198:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
at onErrorNT (internal/child_process.js:415:16)
at process.tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
Am I missing something? Any idea where my fault is?
Small side notice: ikea-availability-check
can not be found as a executable.
Promise {
<rejected> TypeError: stores.getStoreById is not a function
at Object.availability ([...]/node_modules/ikea-availability-checker/source/index.js:21:26)
}
(node:12110) UnhandledPromiseRejectionWarning: TypeError: stores.getStoreById is not a function
Apparently the store
object does not contain getStoreById
anymore but findById
instead
const checker = require('ikea-availability-checker');
console.log(Object.keys(checker.stores));
[
'data',
'findByQuery',
'findById',
'findOneById',
'findByCountryCode',
'getCountryCodes',
'getLanguageCode'
]
Promise {
<rejected> AssertionError [ERR_ASSERTION]: Expected first argument countryCode to be a string, instead undefined given.
at new IOWS2 ([...]/node_modules/ikea-availability-checker/source/lib/iows2.js:52:12)
at Object.availability ([...]/node_modules/ikea-availability-checker/source/index.js:24:18)
It seems that stores.findById
returns an array of stores, this is why the below code throws an error
const store = stores.findById(buCode);
// @TODO handle error when store could not be found
const iows = new IOWS2(store.countryCode);
the object store
is an array, not an object containing countryCode
resulting in an undefined value, handled by the asserter as an error
master
branch failed. ๐จI recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโm sure you can fix this ๐ช.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donโt help, or if this issue is reporting something you think isnโt right, you can always ask the humans behind semantic-release.
The npm token configured in the NPM_TOKEN
environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/
.
If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.
Please make sure to set the NPM_TOKEN
environment variable in your CI with the exact value of the npm token.
Good luck with your project โจ
Your semantic-release bot ๐ฆ๐
It looks like Store 537 FL, Jacksonville is missing from the list.
Thanks.
Iโm opening up this issue first reported by @patrys666 in #5.
You don't have permission to access >"http://iows.ikea.com/retail/iows/pl/pl/stores/availability/90210490" on this server.
Reference #18.df710617.1590422538.10587b88
This issue arises sometimes, not every time but once it is there it keeps on happening.
Query: npm run start -- stock --country us S19282863
Output:
(node:17224) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toISOString' of undefined
at /Users/martinstoyanov/Downloads/ikea/node_modules/ikea-availability-checker/source/lib/reporter/stock-table.js:57:32
at Array.map (<anonymous>)
at Object.createReport (/Users/martinstoyanov/Downloads/ikea/node_modules/ikea-availability-checker/source/lib/reporter/stock-table.js:56:8)
at /Users/martinstoyanov/Downloads/ikea/node_modules/ikea-availability-checker/source/cli-stock.js:114:45
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:17224) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17224) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I'm on the latest version. Thanks!
Noticed in #4 some IKEA websites use another version of the IOWS interface. For example Ireland is requesting the availability information from here: https://www.ikea.com/ie/en/retail/iows/stores/038/item/SPR,29932181
An example response looks like this:
{
"StoreItem": {
"ItemNo": {
"$": 29932181
},
"ItemType": {
"$": "SPR"
},
"StoreNo": {
"$": "038"
},
"StoreName": {
"$": "Dublin Store"
},
"Availability": {
"AvailabilityClassificationList": {
"AvailabilityClassification": [
{
"ClassificationValue": {
"$": "YES"
},
"ClassificationType": {
"$": "STORE"
}
},
{
"ClassificationValue": {
"$": "YES"
},
"ClassificationType": {
"$": "CUSTORDER"
}
}
]
},
"AvailableStockList": {
"AvailableStock": {
"AvailableStockType": {
"$": "STORE"
},
"InStockProbabilityCode": {
"$": "HIGH"
},
"InStockProbabilityReliabilityCode": {
"$": "HIGH"
},
"EarliestRestockDate": {
"$": "2018-12-13"
},
"RestockReliabilityCode": {
"$": "MEDIUM"
},
"AvailableStockUpdateDateTime": {
"$": "2018-10-15"
}
}
}
},
"PriceList": {},
"ApproachEndDateSale": {
"$": false
},
"StoreItemChildList": {
"StoreItemChild": [
{
"ItemNo": {
"$": 90217972
},
"ItemType": {
"$": "ART"
},
"Availability": {
"AvailabilityClassificationList": {
"AvailabilityClassification": [
{
"ClassificationValue": {
"$": "YES"
},
"ClassificationType": {
"$": "STORE"
}
},
{
"ClassificationValue": {
"$": "YES"
},
"ClassificationType": {
"$": "CUSTORDER"
}
}
]
},
"AvailableStockList": {
"AvailableStock": {
"AvailableStockType": {
"$": "STORE"
},
"InStockProbabilityCode": {
"$": "HIGH"
},
"InStockProbabilityReliabilityCode": {
"$": "HIGH"
},
"EarliestRestockDate": {
"$": "2018-12-13"
},
"RestockReliabilityCode": {
"$": "MEDIUM"
},
"AvailableStockUpdateDateTime": {
"$": "2018-10-15"
}
}
}
},
"PriceList": {},
"SalesMethodCode": {
"$": "SELF_SERVE"
},
"RecommendedSalesLocation": {
"Aisle": {
"$": 16
},
"Bin": {
"$": "02"
},
"Department": {
"$": "Even number aisles"
}
},
"ApproachEndDateSale": {
"$": false
}
},
{
"ItemNo": {
"$": "00251135"
},
"ItemType": {
"$": "ART"
},
"Availability": {
"AvailabilityClassificationList": {
"AvailabilityClassification": [
{
"ClassificationValue": {
"$": "YES"
},
"ClassificationType": {
"$": "STORE"
}
},
{
"ClassificationValue": {
"$": "YES"
},
"ClassificationType": {
"$": "CUSTORDER"
}
}
]
},
"AvailableStockList": {
"AvailableStock": {
"AvailableStockType": {
"$": "STORE"
},
"InStockProbabilityCode": {
"$": "HIGH"
},
"InStockProbabilityReliabilityCode": {
"$": "HIGH"
},
"EarliestRestockDate": {
"$": "2018-12-13"
},
"RestockReliabilityCode": {
"$": "MEDIUM"
},
"AvailableStockUpdateDateTime": {
"$": "2018-11-26"
}
}
}
},
"PriceList": {},
"SalesMethodCode": {
"$": "SELF_SERVE"
},
"RecommendedSalesLocation": {
"Aisle": {
"$": 16
},
"Bin": {
"$": "05"
},
"Department": {
"$": "Even number aisles"
}
},
"ApproachEndDateSale": {
"$": false
}
}
]
}
}
}
I have the latest version of ikea-availability-checker and the current recommended version of node.js, 10.16.3. When I run npm install ikea-availability-checker
per the Installation section of the readme, I get the following error:
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "ikea-availability-checker" under a package
npm ERR! also called "ikea-availability-checker". Did you name your project the same
npm ERR! as the dependency you're installing?
In some cases (at least one, indicated in #26) the IKEA iows API replies with a different JSON format than expected. In that case an exception is thrown while there are other stores valid. There should be a special soft-handling of unparsable json response formats which results in a similar output like a 404 (cli-stock.js:122) so that itโs possible to find out which store raises the error.
next
branch failed. ๐จI recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโm sure you can fix this ๐ช.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the next
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donโt help, or if this issue is reporting something you think isnโt right, you can always ask the humans behind semantic-release.
An npm token must be created and set in the NPM_TOKEN
environment variable on your CI environment.
Please make sure to create an npm token and to set it in the NPM_TOKEN
environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/
.
Good luck with your project โจ
Your semantic-release bot ๐ฆ๐
Hi, I am looking to add store in Ireland. Can you tell how to find a store code?
I should add this to ./data/buCodes.csv
and ./data/stores.json
?
Hi,
I have recently submitted a PR for adding the belgian stores( #50 ).
I have seen that it has been merged immediately, brilliant!
However I thought I am having trouble using the recently added stores:
If I run:
ikea-availability stock --country be 30346934
I get the following output:
/usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:94
const err = new errors.IOWS2ResponseError(`Unexpected http status code ${response.status}`);
^
IOWS2ResponseError: Unable to receive product 30346934 availability for store 483 status code: 400 Bad Request using url: https://iows.ikea.com/retail/iows/be/be/stores/483/availability/ART/30346934
at /usr/local/lib/node_modules/ikea-availability-checker/source/lib/iows2.js:94:23
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 1) {
request: {
url: 'https://iows.ikea.com/retail/iows/be/be/stores/483/availability/ART/30346934',
params: {
headers: {
Accept: 'application/vnd.ikea.iows+json;version=1.0',
Contract: '37249',
Consumer: 'MAMMUT'
}
}
},
response: Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: {
body: <ref *1> Gunzip {
_writeState: Uint32Array(2) [ 0, 0 ],
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: null,
ended: false,
endEmitted: false,
reading: false,
constructed: true,
sync: false,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: null
},
_events: [Object: null prototype] {
prefinish: [Function: prefinish],
error: [Function (anonymous)]
},
_eventsCount: 2,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: true,
needDrain: false,
ending: true,
ended: true,
finished: true,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: true,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: true,
bytesWritten: 0,
_handle: Zlib {
onerror: [Function: zlibOnError],
buffer: Buffer(0) [Uint8Array] [],
cb: [Function (anonymous)],
availOutBefore: 16384,
availInBefore: 0,
inOff: 0,
flushFlag: 2,
[Symbol(owner_symbol)]: [Circular *1]
},
_outBuffer: Buffer(16384) [Uint8Array] [
176, 203, 210, 182, 176, 203, 210, 182, 72, 240, 45, 4,
72, 240, 45, 4, 0, 0, 0, 0, 8, 0, 0, 0,
0, 0, 0, 0, 128, 240, 45, 4, 255, 255, 255, 255,
10, 0, 0, 0, 255, 255, 255, 255, 49, 0, 0, 0,
0, 0, 0, 0, 128, 0, 0, 0, 49, 133, 236, 92,
89, 133, 236, 92, 129, 133, 236, 92, 169, 133, 236, 92,
8, 241, 45, 4, 8, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 164, 240, 45, 4, 0, 0, 0, 0,
172, 240, 45, 4,
... 16284 more items
],
_outOffset: 0,
_chunkSize: 16384,
_defaultFlushFlag: 2,
_finishFlushFlag: 2,
_defaultFullFlushFlag: 3,
_info: undefined,
_maxOutputLength: 1073741823,
_level: -1,
_strategy: 0,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null,
[Symbol(kError)]: null
},
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
url: 'https://iows.ikea.com/retail/iows/be/be/stores/483/availability/ART/30346934',
status: 400,
statusText: 'Bad Request',
headers: Headers {
[Symbol(map)]: [Object: null prototype] {
'x-backside-transport': [ 'FAIL FAIL,FAIL FAIL' ],
'content-type': [ 'text/xml' ],
'unique-rq-id': [ '1622021866-568f4f7' ],
'x-global-transaction-id': [ '34ed051960ae16ea0076f571' ],
'content-encoding': [ 'gzip' ],
'content-length': [ '0' ],
date: [ 'Wed, 26 May 2021 09:37:46 GMT' ],
connection: [ 'close' ],
vary: [ 'Accept-Encoding' ],
'x-content-type-options': [ 'nosniff' ],
'strict-transport-security': [ 'max-age=31536000' ],
server: [ 'IITP Server' ]
}
},
counter: 0
}
}
}
I think the issue might be in the URL that is being called:
https://iows.ikea.com/retail/iows/be/**be**/stores/483/availability/ART/30346934
As Belgium has two languages, it might be "fr" or "nl".
Unfortunately I have been trying to send a request with postman to test this assumption but I am always getting error 400, even by adding the headers:
Accept:application/vnd.ikea.iows+json;version=1.0
Contract:37249
Consumer:MAMMUT
``
Any help diagnosing it further?
Hi!
Thanks for sharing the code of your nice project! :-)
I was wondering if you were willing to add a reporter for generating Markdown/CommonMark tables.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.