Closed henryennis closed 3 years ago
Does this produce the same error?
npx @roxi/routify init
npm run build
Does this produce the same error?
npx @roxi/routify init npm run build
Yes, it produces the same error.
I've tested with the https://svelte.dev/ base template as well. Upgraded the rollup packages to the same versions as in @roxi/routify and that build script is working. So it might not be the rollup script that is breaking, but I'm not 100% sure.
Thanks for catching this! Found the error on line 48 of rollup.config.js.
Replacing it with
chunkFileNames:`[name]${production && '-[hash]'}.js`
should hopefully fix the bug.
EDIT: Updated the starter template.
keep it up guys @jakobrosenberg, was looking to use routify for a production app but I stuck to sapper because of this error.
@lookaroundfriend just to clarify, the error has been fixed. Good luck with your project. 👍
src/main.js → dist/build... [!] TypeError: name.replace is not a function TypeError: name.replace is not a function at sanitizeFileName (C:\Users\henry\Desktop\Development\routify template\node_modules\rollup\dist\shared\rollup.js:65:17) at isPlainPathFragment (C:\Users\henry\Desktop\Development\routify template\node_modules\rollup\dist\shared\rollup.js:81:9) at renderNamePattern (C:\Users\henry\Desktop\Development\routify template\node_modules\rollup\dist\shared\rollup.js:10897:10) at Chunk$1.generateId (C:\Users\henry\Desktop\Development\routify template\node_modules\rollup\dist\shared\rollup.js:11145:27) at Bundle$1.assignChunkIds (C:\Users\henry\Desktop\Development\routify template\node_modules\rollup\dist\shared\rollup.js:12424:34) at Bundle$1.addFinalizedChunksToBundle (C:\Users\henry\Desktop\Development\routify template\node_modules\rollup\dist\shared\rollup.js:12384:14) at Bundle$1.generate (C:\Users\henry\Desktop\Development\routify template\node_modules\rollup\dist\shared\rollup.js:12368:24) at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at handleGenerateWrite (C:\Users\henry\Desktop\Development\routify template\node_modules\rollup\dist\shared\rollup.js:19946:23)
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! svelte-app@1.0.0 build:app:
routify -b && rollup -c
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the svelte-app@1.0.0 build:app script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\henry\AppData\Roaming\npm-cache_logs\2020-11-23T01_56_01_611Z-debug.log ERROR: "build:app" exited with 1. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! svelte-app@1.0.0 build:
run-s build:*
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the svelte-app@1.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\henry\AppData\Roaming\npm-cache_logs\2020-11-23T01_56_01_694Z-debug.log