Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Error log

I got error

$ npm run format

> @seepine/hono-typeorm@0.1.1 format
> prettier --write src

[error] Invalid configuration for file "/home/coder/workspace/hono-typeorm/src/column.test.ts":
[error] The requested module 'prettier' does not provide an export named 'Config'

My project

package.json

{
  "scripts": {
    "format": "prettier --write src"
  },
  "devDependencies": {
    "@types/node": "^20.0.0",
    "prettier": "^3.7.4"
  }
}

.prettierrc.ts

import { Config } from 'prettier'

export default {
  semi: false,
  singleQuote: true,
  useTabs: false,
  tabWidth: 2,
  printWidth: 100,
  trailingComma: 'all',
  bracketSpacing: true,
  arrowParens: 'avoid',
} as Config
You must be logged in to vote

I found it, must add type when import

// import {Config } from 'prettier'
import { type Config } from 'prettier'

Replies: 1 comment

Comment options

I found it, must add type when import

// import {Config } from 'prettier'
import { type Config } from 'prettier'
You must be logged in to vote
0 replies
Answer selected by seepine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.