Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

import path cannot end with ts

//I had this issue and it took me the better part of an hour
//to realize all I had to do was remove the .ts extension from the import.

// index.ts
import { renderSection, useConfig, writeToFile } from './hooks.ts'

// changed from `./hooks.ts` to `./hooks`
import { renderSection, useConfig, writeToFile } from './hooks'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #import #path #ts
ADD COMMENT
Topic
Name
7+9 =