简体   繁体   中英

Cannot require config module 3 directories away in nodejs

I have this line const config = require(".../config"); in user.controller.js. This is my directory structure: 目录结构

Please try

const config = require ("../../config")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM