Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

looks like this module does not work with VSF API version > 1.12.1 #1

Open
revington opened this issue Feb 2, 2021 · 1 comment
Open

Comments

@revington
Copy link

Problem is that https://github.com/vuestorefront/vue-storefront-api/tree/v1.12.2/src/lib does no longer have an ./src/lib/taxcalc.js file

Trace: Error: Cannot find module '../../lib/taxcalc'                                                                           
Require stack:                                                                                                                 
- /home/pedro/work/super-shop/vue/vue-storefront-api/src/platform/opencart2/tax.js                                            
- /home/pedro/work/super-shop/vue/vue-storefront-api/src/platform/factory.ts                                                  
- /home/pedro/work/super-shop/vue/vue-storefront-api/src/api/order.ts                                                         
- /home/pedro/work/super-shop/vue/vue-storefront-api/src/api/index.ts                                                         
- /home/pedro/work/super-shop/vue/vue-storefront-api/src/index.ts                                                             
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)                                                
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)                                                           
    at Module.require (internal/modules/cjs/loader.js:1025:19)                                                                 
    at require (internal/modules/cjs/helpers.js:72:18)                                                                         
    at Object.<anonymous> (/home/pedro/work/super-shop/vue/vue-storefront-api/src/platform/opencart2/tax.js:2:1)              
    at Module._compile (internal/modules/cjs/loader.js:1137:30)                                                                
    at Module.m._compile (/home/pedro/work/super-shop/vue/vue-storefront-api/node_modules/ts-node/src/index.ts:473:23)        
    at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)                                                         
    at Object.require.extensions.<computed> [as .js] (/home/pedro/work/super-shop/vue/vue-storefront-api/node_modules/ts-node/
src/index.ts:476:12)                                                                                                           
    at Module.load (internal/modules/cjs/loader.js:985:32)                                                                     
    at Object.apiError (/home/pedro/work/super-shop/vue/vue-storefront-api/src/lib/util.js:97:12)                             
    at /home/pedro/work/super-shop/vue/vue-storefront-api/src/api/catalog.ts:192:9                                            
    at Generator.next (<anonymous>)                                                                                            
    at /home/pedro/work/super-shop/vue/vue-storefront-api/src/api/catalog.ts:8:71                                             
    at new Promise (<anonymous>)                                                                                               
    at __awaiter (/home/pedro/work/super-shop/vue/vue-storefront-api/src/api/catalog.ts:4:12)                                 
    at Request._callback (/home/pedro/work/super-shop/vue/vue-storefront-api/src/api/catalog.ts:141:39)                       
    at Request.self.callback (/home/pedro/work/super-shop/vue/vue-storefront-api/node_modules/request/request.js:185:22)      
    at Request.emit (events.js:315:20)                                                                                         
    at Request.<anonymous> (/home/pedro/work/super-shop/vue/vue-storefront-api/node_modules/request/request.js:1161:10)       
---                                                                                                                                

@themreza
Copy link
Contributor

themreza commented Feb 2, 2021

Good find. We haven't tested the connector beyond v1.11, but I took a quick look in https://github.com/vuestorefront/vue-storefront-api/search?q=checkIfTaxWithUserGroupIsActive and it seems like the functions that are imported from that missing file are now in vsf-utilities.

I recommend cloning this repository, making a new branch, and changing the faulty line to this:

https://github.com/vuestorefront/vue-storefront-api/blob/51f9e333220e65fbe7ef4ec0e2fbfd3576468730/src/platform/magento1/tax.js#L2

If it works out for you it would be awesome if you make a PR so others can use this on v1.12 :)

revington added a commit to revington/vue-storefront-api-opencart2-platform that referenced this issue Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants