What version of node are you running?
Vite requires Node.js version 14.18+, 16+
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to deploy to a remote server, and after running yarn build I receive an error: TypeError: Cannot read properties of undefined (reading 'endsWith').
The error stack is:
at isWrappedId (file:///home/subserver.cloudwaysapps.com/serverid/private_html/releases/20230124064416/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:7742:40)
at Object.resolveId (file:///home/subserver.cloudwaysapps.com/serverid/private_html/releases/20230124064416/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:7951:11)
at file:///home/subserver.cloudwaysapps.com/serverid/private_html/releases/20230124064416/node_modules/rollup/dist/es/shared/rollup.js:23704:40
at async PluginDriver.hookFirstAndGetPlugin (file:///home/subserver.cloudwaysapps.com/serverid/private_html/releases/20230124064416/node_modules/rollup/dist/es/shared/rollup.js:23604:28)
at async resolveId (file:///home/subserver.cloudwaysapps.com/serverid/private_html/releases/20230124064416/node_modules/rollup/dist/es/shared/rollup.js:22547:26)
at async ModuleLoader.loadEntryModule (file:///home/subserver.cloudwaysapps.com/serverid/private_html/releases/20230124064416/node_modules/rollup/dist/es/shared/rollup.js:23156:33)
at async Promise.all (index 1)
I'm having difficulty troubleshooting this, and Google searches have not been helpful. Any thoughts in what I could do to find the problem?
Thank you.
@Sinnbeck That's a good idea. However, I just confirmed a fix. But definitely good if someone else runs into a similar situation.
In commenting out line by line through vite.config.js, I found the issue was the commented out [require("tailwindcss")]. I seems to have gotten there through some init for Tailwindcss, but was the culprit. Once commented out, everything worked.
Thank you again for your quick responses; it helped to have someone to bounce ideas off of. All the best.
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel({
input: [
'./resources/sass/app.scss',
'./resources/js/app.js'
// [require("tailwindcss")],
],
refresh: true,
}),
Please or to participate in this conversation.