akiarostami / sveltekit-tailwind-blog-starter

An easily configurable and customizable blog starter for SvelteKit + Tailwind CSS

Home Page:https://pied-piper-blog.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building with the node adapater fails

trex0r opened this issue · comments

commented

When trying to build the project for production, using the node adapter, I get an error.

Steps to reproduce:

git clone https://github.com/akiarostami/sveltekit-tailwind-blog-starter
cd sveltekit-tailwind-blog-starter
npm install
npm i -D @sveltejs/adapter-node
# use import adapter from '@sveltejs/adapter-node'; in svelte.config.js instead of adapter-auto
npm run build

This results in the following error part way through the build process:

> Using @sveltejs/adapter-node
error during build:
RollupError: Unexpected character '' (Note that you need plugins to import files that are not JavaScript)
    at error (file:///home/user/Code/sveltekit/sveltekit-tailwind-blog-starter/node_modules/rollup/dist/es/shared/rollup.js:1967:30)
    at Module.error (file:///home/user/Code/sveltekit/sveltekit-tailwind-blog-starter/node_modules/rollup/dist/es/shared/rollup.js:12962:16)
    at Module.tryParse (file:///home/user/Code/sveltekit/sveltekit-tailwind-blog-starter/node_modules/rollup/dist/es/shared/rollup.js:13356:25)
    at Module.setSource (file:///home/user/Code/sveltekit/sveltekit-tailwind-blog-starter/node_modules/rollup/dist/es/shared/rollup.js:13247:39)
    at ModuleLoader.addModuleSource (file:///home/user/Code/sveltekit/sveltekit-tailwind-blog-starter/node_modules/rollup/dist/es/shared/rollup.js:22888:20)

If you are able to assist with this, I would really appreciate it. This project is great and has helped me a lot. Thanks for all the work you have put into it!

Hi @trex0r,

I've never used the node adapter, so I'm afraid I can't help you much. This code is supposed to be used as a reference, not actual code, since everyone's need and style is different.

Looking at the error, this seems to be a rollup setting issue, and (hopefully) not a code issue, so I'll move this to Discussion. I hope you can figure it out!