Unable to build due to a missing type in `stringifyStringArray.ts`
See original GitHub issueI wasn’t able to build my project due to an error in the file mentioned, the fix is just to change str
to str: string
.
yarn run v1.22.15
warning package.json: No license field
$ vite build && vite build --ssr && vite-plugin-ssr prerender
vite v2.6.3 building for production...
✓ 1082 modules transformed.
dist/client/vite-plugin-ssr.json 0.07 KiB
dist/client/manifest.json 1.29 KiB
dist/client/assets/src/pages/_default.page.client.tsx.32d0876b.js 1.81 KiB / gzip: 0.94 KiB
dist/client/assets/_error.page.19cf351f.js 0.36 KiB / gzip: 0.22 KiB
dist/client/assets/register.page.33af1e9a.js 0.89 KiB / gzip: 0.44 KiB
dist/client/assets/Layout.bf6f0a67.js 4.93 KiB / gzip: 2.31 KiB
dist/client/assets/riddle.page.47c7d71f.js 1.01 KiB / gzip: 0.54 KiB
dist/client/assets/vendor.c27e8720.js 469.97 KiB / gzip: 145.38 KiB
node_modules/vite-plugin-ssr/shared/utils/stringifyStringArray.ts:4:32 - error TS7006: Parameter 'str' implicitly has an 'any' type.
4 return '[' + stringList.map((str) => "'" + str + "'").join(', ') + ']'
~~~
Found 1 error.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
How to fix "Index signature is missing in type" error?
Solution 1: Use type instead of interface. That is because the type [key: string]: string is not compatible with your Query interface, ...
Read more >Next 13: Missing Types for generateStaticParams · Issue ...
A next 13 app with typescript and generateStaticParams can not be build. The following code works in dev mode, but fails on build:....
Read more >TypeScript Fundamentals - Joy of Code
The pokemon array contains only strings, so we get a type error when trying to assign number to string . The VS Code...
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >Index signature for type 'X' is missing in type 'Y' in TS
The error "Index signature for type is missing in type" occurs when TypeScript doesn't consider a type that uses an index signature and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alright, it’s fixed in
0.3.9
.I’ll release tmrw.