I can't use auto-formatting on a nextjs project. I don't know where the problem can come from since it works properly in other react projects. I appreciate if someone could give a hint.
The :CocInfo gives:
## versions
vim version: NVIM v0.5.0
node version: v14.17.0
coc.nvim version: 0.0.80-9fd90ad761
coc.nvim directory: /Users/saeed/.vim/plugged/coc.nvim
term: iTerm.app
platform: darwin
## Log of coc.nvim
2022-01-06T22:41:12.048 INFO (pid:91315) [plugin] - coc.nvim 0.0.80-9fd90ad761 initialized with node: v14.17.0 after 109ms
2022-01-06T22:41:13.248 INFO (pid:91315) [services] - registered service "tsserver"
2022-01-06T22:41:15.332 ERROR (pid:91315) [semanticTokens-buffer] - Error on semanticTokens highlight: TypeError: import_coc21.SemanticTokensBuilder is not a constructor
at TypeScriptDocumentSemanticTokensProvider._provideSemanticTokens (/Users/saeed/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:10393:21)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Kb.provideDocumentSemanticTokens (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:210:28866)
at async wD.requestHighlights (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:254:13779)
at async wD.doHighlight (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:254:11966)
2022-01-06T22:41:40.120 INFO (pid:91315) [attach] - receive notification: checkJsonExtension []
2022-01-06T22:41:40.161 INFO (pid:91315) [services] - registered service "json"
2022-01-06T22:41:40.161 INFO (pid:91315) [services] - Json language server state change: stopped => starting
2022-01-06T22:41:40.208 INFO (pid:91315) [services] - Json language server state change: starting => running
2022-01-06T22:41:40.209 INFO (pid:91315) [services] - service json started
2022-01-06T22:43:24.397 ERROR (pid:91315) [semanticTokens] - Error on semantic highlighters: TypeError: import_coc21.SemanticTokensBuilder is not a constructor
at TypeScriptDocumentSemanticTokensProvider._provideSemanticTokens (/Users/saeed/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:10393:21)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Kb.provideDocumentSemanticTokens (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:210:28866)
at async wD.requestHighlights (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:254:13779)
at async wD.doHighlight (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:254:11966)
at async wD.forceHighlight (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:254:11040)
2022-01-06T22:43:57.869 INFO (pid:91315) [attach] - receive notification: openLog []
2022-01-06T22:47:47.406 ERROR (pid:91315) [semanticTokens] - Error on semantic highlighters: TypeError: import_coc21.SemanticTokensBuilder is not a constructor
at TypeScriptDocumentSemanticTokensProvider._provideSemanticTokens (/Users/saeed/.config/coc/extensions/node_modules/coc-tsserver/lib/index.js:10393:21)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Kb.provideDocumentSemanticTokens (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:210:28866)
at async wD.requestHighlights (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:254:13779)
at async wD.doHighlight (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:254:11966)
at async wD.forceHighlight (/Users/saeed/.vim/plugged/coc.nvim/build/index.js:254:11040)
2022-01-06T22:47:56.483 INFO (pid:91315) [attach] - receive notification: showInfo []
I can't use auto-formatting on a
nextjs
project. I don't know where the problem can come from since it works properly in other react projects. I appreciate if someone could give a hint.The
:CocInfo
gives: