Deploy SvelteKit App to Vercel, could not resolve install-fetch - vercel

When deploying my SvelteKit app to Vercel I get the following error:
> Using #sveltejs/adapter-vercel
✘ [ERROR] Could not resolve "#sveltejs/kit/install-fetch"
.svelte-kit/vercel-tmp/render/serverless.js:1:29:
1 │ import { installFetch } from '#sveltejs/kit/install-fetch';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The path "./install-fetch" is not exported by package "#sveltejs/kit":
node_modules/#sveltejs/kit/package.json:59:13:
59 │ "exports": {
╵ ^ You can mark the path "#sveltejs/kit/install-fetch" as external to exclude it from the
bundle, which will remove this error. error during build: Error: Build
failed with 1 error: .svelte-kit/vercel-tmp/render/serverless.js:1:29:
ERROR: Could not resolve "#sveltejs/kit/install-fetch"
at failureErrorWithLog (/vercel/path0/node_modules/esbuild/lib/main.js:1603:15)
at /vercel/path0/node_modules/esbuild/lib/main.js:1249:28
at runOnEndCallbacks (/vercel/path0/node_modules/esbuild/lib/main.js:1162:65)
at buildResponseToResult (/vercel/path0/node_modules/esbuild/lib/main.js:1247:7)
at /vercel/path0/node_modules/esbuild/lib/main.js:1356:14
at /vercel/path0/node_modules/esbuild/lib/main.js:666:9
at handleIncomingPacket (/vercel/path0/node_modules/esbuild/lib/main.js:763:9)
at Socket.readFromStdout (/vercel/path0/node_modules/esbuild/lib/main.js:632:7)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12) Error: Command "npm run build" exited with 1
The app runs locally (npm run dev). Before updating to a newer version of SvelteKit I was able to deploy to Vercel successfully.

It seems I was using an old adapter. npm install #sveltejs/adapter-auto#1.0.0-next.83 fixed it.

Related

Vercel deployment Error: Command "CI='' npm run build" exited with 1

I was making my portfolio with NextJs and testing live how it looks in production, anyway, everything was perfect until I make a component with grid images, the Vercel terminal shows an error, and then searched for the solution. The code doesn't shows any warnings or something like that.
I have to change the command build to CI='' npm run build, but now my project is okay with a new URL and my component with the images doesn't show, just 1 image is in the site. I don't know why, but now in the terminal, it shows me :
[10:07:12.718] Cloning github.com/LucianoCerullo77/portfoliov2 (Branch: main, Commit: ab73db1)
[10:07:12.723] Skipping build cache since Vercel CLI used --force option
[10:07:13.125] Cloning completed: 407.165ms
[10:07:13.532] Running "vercel build"
[10:07:14.022] Vercel CLI 28.8.0
[10:07:14.319] Installing dependencies...
[10:07:22.608]
[10:07:22.608] added 288 packages in 8s
[10:07:22.608]
[10:07:22.608] 98 packages are looking for funding
[10:07:22.609] run `npm fund` for details
[10:07:22.625] Detected Next.js version: 13.0.6
[10:07:22.627] Running "CI='' npm run build"
[10:07:22.923]
[10:07:22.924] > portfoliov2#0.1.0 build
[10:07:22.924] > next build
[10:07:22.924]
[10:07:23.364] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[10:07:23.365] This information is used to shape Next.js' roadmap and prioritize features.
[10:07:23.365] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[10:07:23.365] https://nextjs.org/telemetry
[10:07:23.365]
[10:07:23.491] info - Linting and checking validity of types...
[10:07:23.868] error - ESLint: Failed to load config "next/babel" to extend from. Referenced from: /vercel/path0/.eslintrc.json
[10:07:23.875] info - Creating an optimized production build...
[10:07:23.919] info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
[10:07:24.425] info - Using external babel configuration from /vercel/path0/.babelrc
[10:07:28.276] Failed to compile.
[10:07:28.277]
[10:07:28.277] ./components/Projects/index.jsx
[10:07:28.277] Module not found: Can't resolve '../../public/projects/Fennex.png' in '/vercel/path0/components/Projects'
[10:07:28.277]
[10:07:28.277] Import trace for requested module:
[10:07:28.278] ./components/Projects/index.jsx
[10:07:28.278]
[10:07:28.278] ./components/Projects/index.jsx
[10:07:28.278] Module not found: Can't resolve '../../public/projects/Olivia.png' in '/vercel/path0/components/Projects'
[10:07:28.278]
[10:07:28.278] Import trace for requested module:
[10:07:28.278] ./components/Projects/index.jsx
[10:07:28.278]
[10:07:28.278]
[10:07:28.278] > Build failed because of webpack errors
[10:07:28.310] Error: Command "CI='' npm run build" exited with 1
I need help, I don't know how to fix it.

Getting Module build failed error while running npm run dev

Getting error while running npm run dev
Laravel: 9.19
Vuejs: 2.6
Laravel-mix:6.0.12
Thanks in advance:)
Error:
ERROR in ./resources/sass/app/app.scss
Module build failed (from ./node_modules/laravel-mix/node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js):
Error: Can't resolve '../../../node_modules/bootstrap-sass/assets/stylesheets/fonts/bootstrap/glyphicons-halflings-regular.eot' in '/var/www/html/project-name/resources/sass/app'
at finishWithoutResolve (/var/www/html/project_name/node_modules/enhanced-resolve/lib/Resolver.js:309:18)
ERROR in ./resources/sass/admin/admin.scss
Module build failed (from ./node_modules/laravel-mix/node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js):
Error: Can't resolve '../../../node_modules/admin-lte-sass/build/bootstrap/scss/fonts/bootstrap/glyphicons-halflings-regular.eot' in '/var/www/html/project-name/resources/sass/admin'
2 ERRORS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 4 errors

Error when I try to run an app in android Ionic 4

I have this error when I try to run my app in android
An unhandled exception occurred: [BABEL] C:\Users\UserName\Desktop\Ionic\MyProject\www\32-es2015.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\Users\UserName\Desktop\Ionic\MyProject\node_modules\#babel\preset-env\lib\index.js")
See "C:\Users\UserN~1\AppData\Local\Temp\ng-GJZvQx\angular-errors.log" for further details.
[ERROR] An error occurred while running subprocess ng.
as mentioned in this workaround
delete node_modules and package-lock.json
add "resolutions": { "#babel/preset-env": "^7.8.7" } to package.json
npm install npm-force-resolutions --save-dev
npm install
npx npm-force-resolutions
npm install again
run or build your app
if the error persist in future builds of your app try from step 5 before build it.
open package.json
"dependencies": {
"#babel/compat-data": "7.8.0"
}
run command
npm install
and then build your project and it should work.

unable to load 3rd party library to aurelia cli

I'm trying to install jwt-decode to my aurelia cli application. I've npm installed the library and added it to my aurelia.json file:
"dependencies": [
... other deps
{
"name": "jwt-decode",
"path": "../node_modules/jwt-decode/lib",
"main": "index"
}
... other deps
]
When I run au build or au run everything compiles and I can see the the cli is tracing the jwt-decode package; however, when I try to include it in a file I get an error:
src/stores/auth/service.ts(4,24): error TS2307: Cannot find module 'jwt-decode'.
[22:13:04] gulp-notify: [Error running Gulp] Error: src/stores/auth/service.ts(4,24): error TS2307: Cannot find module 'jwt-decode'.
[22:13:04] TypeScript: 1 semantic error
[22:13:04] TypeScript: emit succeeded (with errors)
I've even tried adding it to the prepend property but it did not work. I'm also using typescript so I don't know if that could be causing an issue.
Your dependencies section in aurelia.json is correct.
This error is related to TypeScript: typing definition (.d.ts file) is missing for 'jwt-decode' package.
You can install it by typings install dt~jwt-decode --global --save
After that, import it as a global module: import * as jwt from 'jwt-decode';

Getting webpack error "Module not found: Error: Cannot resolve module" in fluxible after re-installing node_modules

I have a fluxible project and I'm getting these errors after I deleted all files in node_modules and reinstalled with npm install -d when I try to run with npm run dev which is node webpack-dev-server.js & PORT=3001 nodemon start.js -e js,jsx. The app was working fine until I reinstalled dependencies.
Here's the fluxible template project
https://github.com/yahoo/generator-fluxible
What is causing these errors and how can I diagnose? Why did it work initially and then stopped working when I reinstalled node modules?
ERROR in ./client.js
Module not found: Error: Cannot resolve module 'node_modules/webpack/buildin/module.js' in /Projects/myproject
# ./client.js 1:0-49
ERROR in ./app.js
Module not found: Error: Cannot resolve module 'node_modules/webpack/buildin/module.js' in /Projects/myproject
# ./app.js 1:0-49
https://github.com/hapijs/qs/issues/128
I think it is a know issue. You can always go back to a previous version.