Can you access node_modules?

#1

Can you access node_modules or not?

0 Likes

#2

Hello, @SWP360
Yes, via console.

0 Likes

#3

What’s the path for it?

0 Likes

#4

Uff, /node_modules? :smile:

0 Likes

#5

Hey @SWP360 the absolute path would be /app/node_modules, which generally is a link to a directory on a shared device. You can access the files there, but changes to those files won’t be permanent; they’ll be overridden the next time your project restarts.

What is it that you’re trying to accomplish? We might be able to give better guidance if we understood your goals a little better.

0 Likes

#6

I wanna start my app through a dependency if that makes sense

0 Likes

#7

I’m probably just missing the idea here; can you provide any more specific information to help me understand it better?

0 Likes

#8

I wanna start my app in nodemon through package.json if that’s possible

0 Likes

#9

Your app has already built-in auto-update feature from Glitch. Every time you edit your app files, node project restarts automatically. If you want to configure restart delay, you can add watch.json file with this structure:

{
  "install": {
    "include": [
      "^package\\.json$",
      "^\\.env$"
    ]
  },
  "restart": {
    "exclude": [
    ],
    "include": [
      "\\.js$",
      "\\.json",
      "\\.sqlite"
    ]
  },
  "throttle": 10000
}

‘install’ means running pnpm install, ‘restart’ means restarting your project


MOD EDIT: minor correction

2 Likes