#path file invalid

14 messages · Page 1 of 1 (latest)

silent ruinBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
blissful warren

tho i have config.json

this is my file path

safe horizon

@blissful warren ok well the file config.json isn't in the same directory as deploy.js. when you try to do require('./config.json') , the ./ part means it will search for the file in the same directory

so fix the path

blissful warren

how?

i dont understand😭

@safe horizon sorry for ping but pls tell me

summer blade

it looks like deploy.js and config.json are in different folders

can you verify that they're in the same folder (src/)

left folioBOT

Tag suggestion for @blissful warren:

  • File paths explained in detail: learn more
  • . refers to the current directory
  • .. refers to the parent directory
  • Node path module: learn more
half canyon

i believe u need this

require(../config.json)
half canyon

@blissful warren see above ^^^^^^^^

blissful warren

thanks