Closed tiagoroldao closed 7 years ago
I have the following file structure:
app | main.ts | app_page | app_page.ts | ... boot.js package.json
boot.js is my entry point, and it loads main.ts, which then imports both npm modules and local scripts
boot.js
main.ts
If app_page.ts is at /app then import {stuff} from './app_page' works just fine. But if app_page.ts is under /app/app_page, an error is thrown:
app_page.ts
/app
import {stuff} from './app_page'
/app/app_page
Error: ENOENT: no such file or directory, lstat '{PATH TO PROJECT}/app/app_page/app_page'
Turns out it was regular old path problems introduced when refactoring file paths.
I have the following file structure:
boot.js
is my entry point, and it loadsmain.ts
, which then imports both npm modules and local scriptsIf
app_page.ts
is at/app
thenimport {stuff} from './app_page'
works just fine. But ifapp_page.ts
is under/app/app_page
, an error is thrown:Error: ENOENT: no such file or directory, lstat '{PATH TO PROJECT}/app/app_page/app_page'