NodeJS不寻找index.js文件

问题描述 投票:0回答:1

我的nodejs服务器无法找到该模块,除非我明确说明我正在寻找index.js文件。例如:

当我不指定index.js时:when I don't specify the index.js:

当我确实指定index.js时(它在./api/index.js中找不到index.js)“”

这是我的package.json:

enter image description here

node.js express nodemon
1个回答
0
投票

我使用babel-node解决了这个问题

© www.soinside.com 2019 - 2024. All rights reserved.