Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

The watch mode of the front stops whenever there is an error #30

Closed
luckylu91 opened this issue Jun 6, 2022 · 2 comments
Closed

The watch mode of the front stops whenever there is an error #30

luckylu91 opened this issue Jun 6, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@luckylu91
Copy link
Collaborator

To reproduce: npm run front_build:dev and create an error in a svelte file

[...] (normal watchmode behavior)
src/front/Pong.svelte:12:1 - error TS1005: ')' expected.

12 
   

assets by status 5.23 KiB [cached] 1 asset
runtime modules 663 bytes 3 modules
orphan modules 71.2 KiB [orphan] 2 modules
cacheable modules 71.3 KiB
  ./src/front/index.ts + 2 modules 71.3 KiB [built] [code generated]
  ./src/front/Pong.svelte 39 bytes [built] [code generated] [1 error]

ERROR in ./src/front/Pong.svelte
Module build failed (from ./node_modules/svelte-loader/index.js):
Error: [svelte-preprocess] Encountered type error
    at throwError (/root/transcendence/node_modules/svelte-preprocess/dist/modules/errors.js:5:11)
    at throwTypescriptError (/root/transcendence/node_modules/svelte-preprocess/dist/modules/errors.js:9:28)
    at transpileTs (/root/transcendence/node_modules/svelte-preprocess/dist/transformers/typescript.js:177:47)
    at simpleTranspiler (/root/transcendence/node_modules/svelte-preprocess/dist/transformers/typescript.js:268:60)
    at transformer (/root/transcendence/node_modules/svelte-preprocess/dist/transformers/typescript.js:311:11)
    at transform (/root/transcendence/node_modules/svelte-preprocess/dist/autoProcess.js:37:12)
    at async /root/transcendence/node_modules/svelte-preprocess/dist/autoProcess.js:118:29
    at async script (/root/transcendence/node_modules/svelte-preprocess/dist/autoProcess.js:148:33)
    at async process_single_tag (/root/transcendence/node_modules/svelte/compiler.js:32503:28)
    at async Promise.all (index 0)
 @ ./src/front/App.svelte 14:0-33 19:12-16
 @ ./src/front/index.ts 1:0-31 2:16-19

webpack 5.72.1 compiled with 1 error in 848 ms
node:internal/validators:120
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:371:5)
    at validateString (node:internal/validators:120:11)
    at Object.dirname (node:path:1276:5)
    at WatcherManager.watchFile (/root/transcendence/node_modules/watchpack/lib/getWatcherManager.js:30:26)
    at /root/transcendence/node_modules/watchpack/lib/watchpack.js:278:41
    at Object.exports.batch (/root/transcendence/node_modules/watchpack/lib/watchEventSource.js:326:3)
    at Watchpack.watch (/root/transcendence/node_modules/watchpack/lib/watchpack.js:276:20)
    at NodeWatchFileSystem.watch (/root/transcendence/node_modules/webpack/lib/node/NodeWatchFileSystem.js:107:16)
    at Watching.watch (/root/transcendence/node_modules/webpack/lib/Watching.js:325:48)
    at /root/transcendence/node_modules/webpack/lib/Watching.js:303:13 {
  code: 'ERR_INVALID_ARG_TYPE'
}
@luckylu91 luckylu91 added the bug Something isn't working label Jun 6, 2022
@DoomDuck
Copy link
Owner

This is a known issue that has been merged in the svelte-loader's main but is not yet part of any new release (and doesn't seem to be coming soon)
See here

@DoomDuck
Copy link
Owner

Done !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants