developmentseed / scoreboard

Encouraging OpenStreetMap mappers with badges, graphs & stats! ✨🕹
https://developmentseed.org/scoreboard
27 stars 9 forks source link

v1.10.1 #650

Closed kamicut closed 3 years ago

kamicut commented 3 years ago

[v1.10.1] - 2021-03-18

Added

LanesGood commented 3 years ago

@kamicut I see the following error when attempting to run develop locally:

yarn seed fails: ``` ~/Github/scoreboard $ yarn seed yarn run v1.22.10 $ knex seed:run --cwd api/src/db Working directory changed to ~/Github/scoreboard/api/src/db Using environment: development Challenge 17020 does not have available metadata Challenge 16964 does not have available metadata Challenge 16803 does not have available metadata Challenge 16801 does not have available metadata Challenge 15364 does not have available metadata Challenge 14797 does not have available metadata Challenge 14532 does not have available metadata (node:34382) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at TM3API.getProjects (/Users/lane/Github/scoreboard/api/src/services/tm_types/tm3.js:46:21) at process._tickCallback (internal/process/next_tick.js:68:7) Error: Error while executing "/Users/lane/Github/scoreboard/api/src/db/seeds/development/campaigns.js" seed: Unexpected token < in JSON at position 0 at Seeder._waterfallBatch (/Users/lane/Github/scoreboard/node_modules/knex/lib/seed/Seeder.js:120:23) SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at TM3API.getProjects (/Users/lane/Github/scoreboard/api/src/services/tm_types/tm3.js:46:21) at process._tickCallback (internal/process/next_tick.js:68:7) error Command failed with exit code 1. ```
then `yarn dev` fails: ``` [nodemon] starting `node server.js` /Users/lane/Github/scoreboard/node_modules/simple-oauth2/lib/client.js:19 #config = null; SyntaxError: Invalid or unexpected token at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789: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:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/Users/lane/Github/scoreboard/node_modules/simple-oauth2/index.js:3:16) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789: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:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/Users/lane/Github/scoreboard/api/src/passport.js:11:31) [nodemon] app crashed - waiting for file changes before starting... ```
kamicut commented 3 years ago

@LanesGood I think you're running into a node version problem. You can use nvm use in the directory to use the correct node version.

LanesGood commented 3 years ago

@kamicut thanks that was indeed the issue - I always forget that I have to nvm use in both terminal windows.