Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript error when adding TailwindCSS (manually, or with svelte-add) #8656

Closed
engageintellect opened this issue Jan 22, 2023 · 11 comments
Closed

Comments

@engageintellect
Copy link

engageintellect commented Jan 22, 2023

Describe the bug

After installing and configuring tailwind, either manually, or with svelte-add, ./tsconfig.json throws the following error:

I initially thought it was an issue with WSL, but have just tested on my mac with same result

Screen Shot 2023-01-21 at 9 46 40 PM

Reproduction

npm create svelte@latest my-app
cd my-app
npm install
npm run dev

npm i svelte-add

npx --yes svelte-add@latest tailwindcss

Logs

[{
	"resource": "/Users/jchadwick/FA/Repositories/svelteekit-blog/tsconfig.json",
	"owner": "typescript",
	"severity": 8,
	"message": "Flag 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: \"5.0\"' to silence this error.\n  Use 'verbatimModuleSyntax' instead.",
	"source": "ts",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 2
}]

Flag 'importsNotUsedAsValues' is deprecated and will stop functioning in TypeScript 5.5. Specify 'ignoreDeprecations: "5.0"' to silence this error.
  Use 'verbatimModuleSyntax' instead.

System Info

System:
    OS: macOS 12.6.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 81.72 MB / 16.00 GB
    Shell: 3.5.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 16.14.0 - /usr/local/bin/node
    npm: 8.3.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 109.0.5414.87
    Safari: 16.2
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0 => 1.0.2
    @sveltejs/kit: ^1.0.0 => 1.2.2
    svelte: ^3.54.0 => 3.55.1
    vite: ^4.0.0 => 4.0.4

Severity

annoyance

Additional Information

I know this appears to be a TypeScript issue, but I was unable to recreate in Next 13, so I just thought I would bring to your attention.

Everything appears to work ok...

@markjaquith
Copy link
Contributor

This is a duplicate of #8650

@engageintellect
Copy link
Author

This is a duplicate of #8650

Seemingly. Except, I only get it when adding Tailwind. OP of #8650 doesn't show Tailwind as a dependency.

@markjaquith
Copy link
Contributor

I couldn't reproduce the issue. What version of TypeScript do you have installed?

@engageintellect
Copy link
Author

I couldn't reproduce the issue. What version of TypeScript do you have installed?

4.9.4

@engageintellect
Copy link
Author

I couldn't reproduce the issue. What version of TypeScript do you have installed?

{
"name": "my-app",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^1.0.0",
"@sveltejs/kit": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"autoprefixer": "^10.4.13",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^4.0.0",
"postcss": "^8.4.21",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"tailwindcss": "^3.2.4",
"tslib": "^2.4.1",
"typescript": "^4.9.4",
"vite": "^4.0.0"
},
"type": "module"
}

@engageintellect
Copy link
Author

I couldn't reproduce the issue. What version of TypeScript do you have installed?

You'll get the error in vs code once you view or touch tsconfig.json

@markjaquith
Copy link
Contributor

You'll get the error in vs code

I didn't get the error. What version of TypeScript do you have running in VS Code? #8650 suggests this was a TypeScript 5.0 beta addition.

@engageintellect
Copy link
Author

You'll get the error in vs code

I didn't get the error. What version of TypeScript do you have running in VS Code? #8650 suggests this was a TypeScript 5.0 beta addition.

Weird, I have been able to reproduce in 3 different repositories, (as well as a branch new one here: https://github.com/engageintellect/sveltekit-1-tailwind)

TypeScript version is 4.9.4

@dummdidumm
Copy link
Member

Everyone who sees this is probably using vs code insiders or sth similar so that they get the latest TS beta version.

@engageintellect
Copy link
Author

Everyone who sees this is probably using vs code insiders or sth similar so that they get the latest TS beta version.

This makes sense.

@dummdidumm
Copy link
Member

Closing as duplicate of #8650

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants