You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing Chart.JS types locally, ParcelJS always throws an error stating it can't find the module with types. Doing the following in a TypeScript file:
import{Chart}from"./chartjs/dist/types";
results in the following error
🚨 Build failed.
@parcel/core: Failed to resolve './chartjs/dist/types' from './src/gpachart/gpachart.ts'
/home/mahid/Documents/Skyward-GPA-calculator/src/gpachart/gpachart.ts:3:23
2 | import { Settings } from "../settings";
> 3 | import { Chart } from "./chartjs/dist/types";
> | ^^^^^^^^^^^^^^^^^^^^^^
4 |
5 | let GPAGraphArray: GraphValueType[];
@parcel/resolver-default: Cannot load file './chartjs/dist/types' in './src/gpachart'.
💡 Did you mean './chartjs/dist/types'?
💡 Did you mean './chartjs/dist/types.d'?
However, the module is indeed located at that path. It seems ParcelJS doesn't want to load the .d.ts files.
🐛 bug report
When importing Chart.JS types locally, ParcelJS always throws an error stating it can't find the module with types. Doing the following in a TypeScript file:
results in the following error
However, the module is indeed located at that path. It seems ParcelJS doesn't want to load the
.d.ts
files.🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
This building perfectly fine
😯 Current Behavior
Getting an error where I can't import the module types
💁 Possible Solution
🔦 Context
💻 Code Sample
https://github.com/watchbutdonotlearn/Skyward-GPA-calculator/ (
rewrite
branch)🌍 Your Environment
The text was updated successfully, but these errors were encountered: