1
resposta

[Dúvida] "Module parse failed: may need an appropriate loader to handle this file type"

Obtive esse erro ao executar o código:

Error: Webpack Compilation Error ./cypress/fixtures/usuarios.json Module parse failed: Unexpected end of JSON input while parsing near '' You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders SyntaxError: Unexpected end of JSON input while parsing near '' @ ./cypress/testes/alurapic.js 33:10-57 at Watching.handle [as handler] (C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules@packages\server\node_modules@cypress\webpack-preprocessor\dist\index.js:231:23) at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\webpack\lib\Watching.js:99:9 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) at Watching.done (C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\nodemodules\webpack\lib\Watching.js:98:28) at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\webpack\lib\Watching.js:73:19 at Compiler.emitRecords (C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:499:39) at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\webpack\lib\Watching.js:54:20 at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:485:14 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:482:27 at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\neo-async\async.js:2818:7 at done (C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\neo-async\async.js:3522:9) at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1) at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules\webpack\lib\Compiler.js:464:33 at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16 at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules@packages\server\node_modules\graceful-fs\graceful-fs.js:143:16 at C:\Users\Matteo\AppData\Local\Cypress\Cache\12.5.1\Cypress\resources\app\node_modules@packages\server\node_modules\graceful-fs\graceful-fs.js:61:14 at FSReqCallback.oncomplete (node:fs:197:23)

esse é meu código

Insira aqui a descrição dessa imagem para ajudar na acessibilidade

essa é minha estrutura de pastas

Insira aqui a descrição dessa imagem para ajudar na acessibilidade

este é o meu json:

Insira aqui a descrição dessa imagem para ajudar na acessibilidade

1 resposta

olá Matteo, experimente colocar uma função click entre elas.