kriasoft / react-firebase-starter

Boilerplate (seed) project for creating web apps with React.js, GraphQL.js and Relay
https://firebase.reactstarter.com
MIT License
4.51k stars 753 forks source link

TypeError: path must be a string or Buffer #316

Open dann815 opened 5 years ago

dann815 commented 5 years ago

$ node -v v8.11.1 $ yarn -v 1.12.3 $ yarn setup yarn run v1.12.3 $ node ./scripts/setup [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... [3/5] 🚚 Fetching packages... [4/5] 🔗 Linking dependencies... warning " > express-graphql@0.6.12" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0". warning "firebase-admin > @firebase/database@0.3.4" has unmet peer dependency "@firebase/app-types@0.x". warning "firebase-admin > @firebase/database > @firebase/database-types@0.3.2" has unmet peer dependency "@firebase/app-types@0.x". warning " > graphql-relay@0.5.5" has incorrect peer dependency "graphql@^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0". warning " > babel-plugin-relay@1.7.0-rc.1" has incorrect peer dependency "graphql@^0.13.0". warning " > eslint-config-prettier@3.0.1" has unmet peer dependency "eslint@>=3.14.1". warning " > eslint-plugin-flowtype@2.50.0" has unmet peer dependency "eslint@>=2.0.0". warning "react-app-tools > babel-plugin-transform-dynamic-import > @babel/plugin-syntax-dynamic-import@7.0.0-beta.34" has incorrect peer dependency "@babel/core@7.0.0-beta.34". warning " > relay-compiler@1.7.0-rc.1" has incorrect peer dependency "graphql@^0.13.0". warning "relay-compiler > graphql-compiler@1.7.0-rc.1" has incorrect peer dependency "graphql@^0.13.0". [5/5] 📃 Building fresh packages... TypeError: path must be a string or Buffer at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object. (/Users/dank/dev/react-firebase-starter/knexfile.js:26:12) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at /Users/dank/dev/react-firebase-starter/scripts/setup.js:18:18 at Object. (/Users/dank/dev/react-firebase-starter/scripts/setup.js:56:3) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

andrewkslv commented 5 years ago

Hi @dann815

The issue you have is caused by line https://github.com/kriasoft/react-firebase-starter/blob/6f7c4ab0671c8ef90a3fe53afe7ce511f34aac4f/.env#L32

To resolve it • you need to uncomment following 3 lines with PostgreSQL .pem files. • get these files from your Cloud SQL dashboard. • place them to the ssl folder.

ulani commented 5 years ago

Often times it's convenient to use a remote SQL database during local development, this way you and your team members can start working on the project right away without any setup steps (other than installing NPM modules via yarn install). For this to work, you would need to download SSL certificates:

image

Put them into ssl folder of your project:

image

And uncomment the following lines in the .env file:

https://github.com/kriasoft/react-firebase-starter/blob/b0429987356459c270dbf43ce7976873c2145f16/.env#L35-L38

I hope this helps!