Most likely an issue with a NPM package.
Try deleting node_modules and reinstalling:
rm -rf node_modules package-lock.json
npm install
Could someone please help me figure out how to go about solving this issue. My project was running absolutely fine yesterday. When i boot it up today using docker, I am having npm issues.
npm run dev
dev vite
VITE v6.2.2 ready in 188 ms
➜ Local:
➜ press h + enter to show help
LARAVEL v11.37.0 plugin v1.2.0
➜ APP_URL: ✘ [ERROR] Unexpected "%"
axios:1:0:
1 │ %!PS-Adobe-3.0
╵ ^
/home/x/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1477 let error = new Error(text); ^
Error: Build failed with 1 error: axios:1:0: ERROR: Unexpected "%" at failureErrorWithLog (/home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1477:15) at /home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:946:25 at /home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1355:9 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) { errors: [Getter/Setter], warnings: [Getter/Setter] }
Node.js v22.14.0
I do not have any high vulnerability issues
x@x-Z170MX-Gaming-5:~/Desktop/Mycenic$ npm audit
sweetalert2 >=11.6.14
sweetalert2 v11.6.14 and above contains potentially undesirable behavior -
fix available via npm audit fix
node_modules/sweetalert2
1 low severity vulnerability
To address all issues, run: npm audit fix
Most likely an issue with a NPM package.
Try deleting node_modules and reinstalling:
rm -rf node_modules package-lock.json
npm install
@RemiM I have tried this already and still get the same problem.
However when I run npm install after removing everything there is a lot of npm warn messages about react
x@x-Z170MX-Gaming-5:~/Desktop/Mycenic$ rm -rf node_modules package-lock.json
npm install
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^18.3.1" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-dom
npm warn peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-spring
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-spring
npm warn react-spring@"^9.0.0-rc.3" from [email protected]
npm warn node_modules/react-toggle-dark-mode
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @react-spring/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/[email protected]
npm warn node_modules/@react-spring/core
npm warn @react-spring/core@"~9.7.5" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-spring
npm warn 5 more (@react-spring/konva, @react-spring/native, ...)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @react-spring/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/[email protected]
npm warn node_modules/@react-spring/animated
npm warn @react-spring/animated@"~9.7.5" from @react-spring/[email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/@react-spring/three
npm warn 5 more (@react-spring/web, @react-spring/zdog, ...)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @react-spring/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/[email protected]
npm warn node_modules/@react-spring/konva
npm warn @react-spring/konva@"~9.7.5" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-spring
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @react-spring/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/[email protected]
npm warn node_modules/@react-spring/shared
npm warn @react-spring/shared@"~9.7.5" from @react-spring/[email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/@react-spring/three
npm warn 6 more (@react-spring/web, @react-spring/zdog, ...)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^18.3.1" from [email protected]
npm warn node_modules/react-reconciler
npm warn react-reconciler@"~0.29.0" from [email protected]
npm warn node_modules/react-konva
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @react-spring/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/[email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/@react-spring/three
npm warn @react-spring/three@"~9.7.5" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-spring
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @react-spring/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/[email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/@react-spring/web
npm warn @react-spring/web@"~9.7.5" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-spring
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @react-spring/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn react@"19.0.0" from the root project
npm warn 20 more (@headlessui/react, react-dom, @inertiajs/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @react-spring/[email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/@react-spring/zdog
npm warn @react-spring/zdog@"~9.7.5" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-spring
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @react-three/[email protected]
npm warn Found: [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-dom
npm warn peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0" from [email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/react-spring
npm warn react-spring@"^9.0.0-rc.3" from [email protected]
npm warn node_modules/react-toggle-dark-mode
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional react-dom@"^19.0.0" from @react-three/[email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/@react-three/fiber
npm warn peer @react-three/fiber@">=6.0" from @react-spring/[email protected]
npm warn node_modules/react-toggle-dark-mode/node_modules/@react-spring/three
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
added 594 packages, and audited 802 packages in 26s
77 packages are looking for funding
run `npm fund` for details
1 low severity vulnerability
To address all issues, run:
npm audit fix
Run `npm audit` for details.
Unfortunately, same error:
> dev
> vite
VITE v6.2.2 ready in 397 ms
➜ Local: ...
➜ press h + enter to show help
LARAVEL v11.37.0 plugin v1.2.0
➜ APP_URL: ...
✘ [ERROR] Unexpected "%"
axios:1:0:
1 │ %!PS-Adobe-3.0
╵ ^
/home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1477
let error = new Error(text);
^
Error: Build failed with 1 error:
axios:1:0: ERROR: Unexpected "%"
at failureErrorWithLog (/home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1477:15)
at /home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:946:25
at /home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1355:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}
Node.js v22.14.0
Well, it looks like you have two problems:
The first one after runing npm installshows that you are using React 19, but some dependencies like react-dom are expecting the version 18.3.1.
You have two options:
react-dom to use React 19.The second error might be fixed after the first is resolve.
Eventually you can share your package.json file if you want further exploration.
Following these two steps certainly minimised the amount of NPM warnings. There seems to only be three now.
taylor@taylor-Z170MX-Gaming-5:~/Desktop/Mycenic$ npm install react@latest react-dom@latest
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn peer react@">=16.8.0" from @floating-ui/[email protected]
npm warn node_modules/@floating-ui/react
npm warn @floating-ui/react@"^0.26.16" from @headlessui/[email protected]
npm warn node_modules/@headlessui/react
npm warn 17 more (@floating-ui/react-dom, @headlessui/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^18.3.1" from [email protected]
npm warn node_modules/react-dom
npm warn peer react-dom@">=16.8.0" from @floating-ui/[email protected]
npm warn node_modules/@floating-ui/react
npm warn 9 more (@floating-ui/react-dom, @headlessui/react, ...)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn peer react@">=16.8.0" from @floating-ui/[email protected]
npm warn node_modules/@floating-ui/react
npm warn @floating-ui/react@"^0.26.16" from @headlessui/[email protected]
npm warn node_modules/@headlessui/react
npm warn 17 more (@floating-ui/react-dom, @headlessui/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^18.3.1" from [email protected]
npm warn node_modules/react-dom
npm warn peer react-dom@">=16.8.0" from @floating-ui/[email protected]
npm warn node_modules/@floating-ui/react
npm warn 9 more (@floating-ui/react-dom, @headlessui/react, ...)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/react
npm warn peer react@">=16.8.0" from @floating-ui/[email protected]
npm warn node_modules/@floating-ui/react
npm warn @floating-ui/react@"^0.26.16" from @headlessui/[email protected]
npm warn node_modules/@headlessui/react
npm warn 17 more (@floating-ui/react-dom, @headlessui/react, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^18.3.1" from [email protected]
npm warn node_modules/react-dom
npm warn peer react-dom@">=16.8.0" from @floating-ui/[email protected]
npm warn node_modules/@floating-ui/react
npm warn 9 more (@floating-ui/react-dom, @headlessui/react, ...)
running npm run dev however still contains the same strange axios error. I am completely pulling my hair out with this one. Truly don't know how to fix this. I've tried removing axios, installing the latest, etc, but nothing works.
taylor@taylor-Z170MX-Gaming-5:~/Desktop/Mycenic$ npm run dev
> [email protected] dev
> vite
VITE v6.2.2 ready in 148 ms
➜ Local: http://localhost:5174/
➜ press h + enter to show help
LARAVEL v11.37.0 plugin v1.2.0
➜ APP_URL: http://localhost
✘ [ERROR] Unexpected "%"
axios:1:0:
1 │ %!PS-Adobe-3.0
╵ ^
/home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1477
let error = new Error(text);
^
Error: Build failed with 1 error:
axios:1:0: ERROR: Unexpected "%"
at failureErrorWithLog (/home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1477:15)
at /home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:946:25
at /home/taylor/Desktop/Mycenic/node_modules/esbuild/lib/main.js:1355:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}
Node.js v22.14.0
I also completely forgot about sharing the package.json file. Thanks for reminding me.
"name": "mycenic",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.3.4"
},
"dependencies": {
"@headlessui/react": "^2.2.0",
"@inertiajs/react": "^2.0.5",
"@tailwindcss/vite": "^4.0.14",
"axios": "^1.8.4",
"framer-motion": "^12.5.0",
"hamburger-react": "^2.5.2",
"laravel-vite-plugin": "^1.2.0",
"lenis": "^1.2.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-icons": "^5.5.0",
"react-toastify": "^11.0.5",
"sweetalert2": "^11.17.2",
"swiper": "^11.2.6",
"tailwindcss": "^4.0.14",
"vite": "^6.2.2"
}
}
I believe the issue comes from headlessui/react's peer dependencies floating-ui.
rm -rf node_modules package-lock.json
npm install react@latest react-dom@latest @headlessui/react@latest
Now, when you run your command npm run devit should work correctly.
If the issue persists with other dependencies, try updating them with their latest available versions.
Please or to participate in this conversation.