harvard-edtech / caccl

The Canvas App Complete Connection Library (CACCL) is an all-in-one library for building Canvas-integrated apps. By handling LTI, authorization, and api for you, CACCL makes building Canvas-integrated tools quick and easy. Keywords: Canvas LMS Instructure API LTI Authorization EdTech Education
MIT License
33 stars 4 forks source link

Error using init #4

Closed STaylorY closed 2 years ago

STaylorY commented 5 years ago

Whenever I try to initialize a project this is what I get:

npx: installed 172 in 25.046s internal/validators.js:125 throw new ERR_INVALID_ARG_TYPE(name, 'string', value); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined at validateString (internal/validators.js:125:11) at Object.join (path.js:427:7) at Object. (C:\Users\NAME\AppData\Roaming\npm-cache_npx\19764\node_modules\create-caccl\helpers\getPackageJSON.js:8:30) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18)

Any tips on how to resolve this issue?

Thanks!

gabeabrams commented 5 years ago

I’ll take a look at it! What version of node and what version of npm are you using?

Also, just in case it’s relevant, what OS are you using?

Thank you!

On Sat, Jul 13, 2019 at 8:44 PM STaylorY notifications@github.com wrote:

Whenever I try to initialize a project this is what I get:

npx: installed 172 in 25.046s internal/validators.js:125 throw new ERR_INVALID_ARG_TYPE(name, 'string', value); ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined at validateString (internal/validators.js:125:11) at Object.join (path.js:427:7) at Object. (C:\Users\NAME\AppData\Roaming\npm-cache_npx\19764\node_modules\create-caccl\helpers\getPackageJSON.js:8:30) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18)

Any tips on how to resolve this issue?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/harvard-edtech/caccl/issues/4?email_source=notifications&email_token=ADLSIACXO6UQAPB5KP35LJ3P7JZFLA5CNFSM4IDFCFVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7BYTSA, or mute the thread https://github.com/notifications/unsubscribe-auth/ADLSIAC6ZONHG5V2TFUGX2LP7JZFLANCNFSM4IDFCFVA .

-- ––

Gabriel Abrams Senior Software Engineer gabe_abrams@harvard.edu Harvard Division of Continuing Education Room 513, 125 Mount Auburn St Phone: (617) 394-8128 Pronouns: he/him/his

STaylorY commented 5 years ago

Node :: v10.15.1 npm :: v6.4.1 OS: Windows 10 Enterprise 2016 LTSB 64-bit

Thank you for looking into this!

gabeabrams commented 5 years ago

Hi STaylorY, I've been looking into this and it seems that the environment variables set by windows aren't what we were expecting. Unfortunately, we don't currently support running this on Windows and we don't plan on starting to support Windows at least not in the near future.

I recommend developing on either Mac or Linux if you plan on using CACCL. If you want to stick with Windows, I'd recommend using a bash shell: https://itsfoss.com/install-bash-on-windows/

If you're using Mac, Linux, or a bash shell and keep getting this error, please let me know!

P.S. I'm adding a note to the docs.

liorla commented 4 years ago

Hi Gabriel, i have encountered the same issue when deploying the application to google app engine. locally the app runs on my MAC OS just fine, but when deploying to google app engine nodejs application, i got the following error: 2020-07-06 20:40:46 default[20200706t233945] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined 2020-07-06 20:40:46 default[20200706t233945] at validateString (internal/validators.js:125:11) 2020-07-06 20:40:46 default[20200706t233945] at Object.join (path.js:1147:7) 2020-07-06 20:40:46 default[20200706t233945] at readConfig (/srv/node_modules/caccl/validateConfigAndSetDefaults/server.js:23:29) 2020-07-06 20:40:46 default[20200706t233945] at module.exports (/srv/node_modules/caccl/validateConfigAndSetDefaults/server.js:33:26) 2020-07-06 20:40:46 default[20200706t233945] at module.exports (/srv/node_modules/caccl/server/index.js:133:18) 2020-07-06 20:40:46 default[20200706t233945] at Object. (/srv/index.js:7:13) 2020-07-06 20:40:46 default[20200706t233945] at Module._compile (internal/modules/cjs/loader.js:778:30) 2020-07-06 20:40:46 default[20200706t233945] at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) 2020-07-06 20:40:46 default[20200706t233945] at Module.load (internal/modules/cjs/loader.js:653:32) 2020-07-06 20:40:46 default[20200706t233945] at tryModuleLoad (internal/modules/cjs/loader.js:593:12) 2020-07-06 20:40:47 default[20200706t233945] "GET /favicon.ico HTTP/1.1" 500 2020-07-06 20:40:48 default[20200706t233945] internal/validators.js:125 2020-07-06 20:40:48 default[20200706t233945] throw new ERR_INVALID_ARG_TYPE(name, 'string', value); 2020-07-06 20:40:48 default[20200706t233945] ^

any ideas? thank you for your help!

Lior.

gabeabrams commented 4 years ago

Hi Lior,

Thank you for the detail you provided! I pushed a small fix that might work for the Google App Engine, though I am less familiar with that platform so could you test it out?

Please update to CACCL v1.1.26 and try again.

Looking forward to seeing how this goes :)

Best, Gabe

liorla commented 4 years ago

Hi Gage, thanks for your answer and fix! well i haven't tried your fix yet, but i have found the cause of the error apparently, when using the standard app engine (as opposed to the flexible app engine) there is no postscript running after the npm install to check for more depndencies to install. i uploaded the app to flexible app eninge (which costs money...) and all worked well :) so this is the fix for the standard app engine: simply don't use it and deploy on flexible app engine...

btw, i have another question: i have deployed the app on heroku (piece of cake!!!) i have followed the instructions, set all config vars (CANVAS_HOST, CLIENT_ID, CLIENT_SECRET, CONSUMER_KEY, CONSUMER_SECRET) tho i'm not usin the API, and set the initCaccl to this: // Initialize CACCL const app = initCACCL({ disableAuthorization: true, disableClientSideAPI: true, disableServerSideAPI: true, });

added and called the app from canvas. got this error: "Please launch this app via canvas" and set any ideas?

thank you again for your time and for the amazing lib1 i've been through many libs but this one simpley works out of the box, it's truly amazing. lior.

gabeabrams commented 2 years ago

Stale. Closing due to inactivity. Please feel free to re-open if helpful!