-
I followed the instructions here, and viewed the example here, but I keep getting errors like this:
I'm unsure what I'm doing wrong. So unsure that I can't even form a very well thought out question or provide info that I think will be useful. I don't even know where to start. (Yes, I'm TOTALLY new to Node.JS...) I DO think this will be useful: Store I'm trying to add. Happy to provide more info if you need. Just let me know. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 3 replies
-
having the same problem |
Beta Was this translation helpful? Give feedback.
-
Do you mind posting the code you're trying to add? Specifically the new store? I can help! |
Beta Was this translation helpful? Give feedback.
-
Absolutely! Thanks for writing/releasing such an awesome utility, too. :-D import {Store} from './store';
export const Honeycomb: Store = {
labels: {
inStock: {
container: '#product_form_4533457682541',
text: ['Add to cart']
},
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url: 'https://flyhoneycomb.com'
},
{
brand: 'honeycomb',
model: 'AlphaFlightYoke',
series: 'yoke',
url: 'https://flyhoneycomb.com/collections/honeycomb-flight-sim-hardware/products/alpha-flight-controls'
},
{
brand: 'honeycomb',
model: 'BravoThrottleQuadrant',
series: 'quadrant',
url: 'https://flyhoneycomb.com/collections/honeycomb-flight-sim-hardware/products/bravo-throttle-quadrant'
},
{
brand: 'honeycomb',
model: 'ThrottlePackForAirbus',
series: 'throttles',
url: 'https://flyhoneycomb.com/collections/honeycomb-flight-sim-hardware/products/airbus-throttle-handles'
},
],
name: 'honeycomb'
}; |
Beta Was this translation helpful? Give feedback.
-
I drove myself crazy over this one for a longtime but figured out how to debug. I believe there is some confusion here. I'm not a coder at all but from fiddling around I ran into this. This current error is not a store error but a product error. You need to add the model, series and brand to the store.TS file. Then you will most likely get a max price error next, so then you have to add to the config.ts the max price series. also update the .env file for this series and model in the max price section. Also update the Readme.md file. finally it should all run. What confusion I see here though is that you're adding a store before adding a model or series for the product. you need to build both. A store and a product as the flight stick is not a tracked product by default. I ran into this trying to Track the pulse 3d headset by Sony. Also using "git" vs command prompt to run your code will literally tell you a debug of what codes the issue is. |
Beta Was this translation helpful? Give feedback.
-
The key to your error btw is this. "Property 'throttles' does not exist on type" Throttles is missing from the Store.ts file. |
Beta Was this translation helpful? Give feedback.
-
You're very close. You need to update Here is the write up I made: https://jef.codes/streetmerchant/help/general/#adding-a-store |
Beta Was this translation helpful? Give feedback.
-
Wow totally solved my problem! @jef should take a look at this |
Beta Was this translation helpful? Give feedback.
-
https://jef.codes/streetmerchant/help/general/#adding-a-store |
Beta Was this translation helpful? Give feedback.
-
Wrote a whole big reply to @Kpa62 (see below), then I saw @attaway's reply. Like @attaway, I got it working. For anyone that may come across this in the future, in addition to what's below and what's in @jef's write-up, I went in and added the following... To
To
I knew the script was looking for something, I just didn't know what. THAT is what it was looking for. Now, whether this actually works for this website, these items, etc or not is yet to be seen, but that's on me. @jef - Could we get your writeup edited/ammended the above "max price" changes to the .env and config.ts files as I do not believe these changes are mentioned but seem to be required for the script to function. Thank you all so much, and again, thanks @jef for writing/releasing this utility! :-D My previous post will be in next comment as I can't get it to look right here... |
Beta Was this translation helpful? Give feedback.
-
Previous post -
Hmm....yup. Did that already. Don't think so, but maybe I did it wrong? (I commented it out so the script would still work while I got the new stuff sorted out.)
Nope. Never saw a price error...
Now this is new. Where is that? What do I have to do there? This is the first I remember seeing "readme.md" anywhere...
Hmm...not sure I follow. I added a store (honeycomb.ts) with the code shared with Jef, added the necessary bits into index.ts:
...(again, commented out so the code will still run), and added all the stuff into store.ts as pasted above. Following Jef's writeup and viewing the example given, as linked to in my initial post, I thought I checked all the boxes. This "readme.md" thing though...this is new. |
Beta Was this translation helpful? Give feedback.
-
Ok lets go one at a time, The location of the readme is on the root of the street merchant folder where you edit the .env fix that part first. the other important thing I did was mark down what my series is, model and brand, as all these need to sync up across the grid. see what errors come after the readme file update. As for a store, is honeycomb the store? you need to create a Store.TS file that pulls from a element on the webpage that determines if the item is in stock of not, this is a process in itself, different from adding another item. that's what i was trying to say. you have 2 build outs needed to accomplish this. the current error however points to the readme file missing your model, series and brand. |
Beta Was this translation helpful? Give feedback.
-
for the store it would b laid out, Honeycomb.ts, within that file it would be the following. This is Walmart's for example. import {Store} from './store'; export const Walmart: Store = { This file goes in SRC/store/ model. |
Beta Was this translation helpful? Give feedback.
-
Now to get it running in a Docker container on my unRAID server. I've never "manually installed" a container on there. Gotta figure out how to do it. Fun fun! :-D |
Beta Was this translation helpful? Give feedback.
Wrote a whole big reply to @Kpa62 (see below), then I saw @attaway's reply. Like @attaway, I got it working.
For anyone that may come across this in the future, in addition to what's below and what's in @jef's write-up, I went in and added the following...
To
streetmerchant/src/config.ts
:To
streetmerchant/.env
:I knew the script was looking for something, I just didn't know what. THAT is what it was looking for.
Now…