External package suddenly throwing relative reference error when trying to build - vite

up until tuesday we had ['#uniswap/v3-sdk', '#uniswap/sdk-core'] in build.rollupOptions.external in our vite config. Although we're suddenly getting this error:
TypeError: Failed to resolve module specifier "#uniswap/v3-sdk".
Relative references must start with either "/", "./", or "../".
Even thou the imports from that library are the same?

Related

Uncaught TypeError: Failed to resolve module specifier "#angular/platform-browser-dynamic"

when I run npm run build, a folder is successfully generated on dist. but when I try to deploy to the server and try to run it in the browser, the following error appears:
Uncaught TypeError: Failed to resolve module specifier "#angular/platform-browser-dynamic". Relative references must start with either "/", "./", or "../".
what does the error mean? and how to fix it?

`Uncaught TypeError: Error resolving module specifier “.prisma/client/index-browser”

I have the following error message in my browser upon using sveltekit and the command "npm run preview":
Uncaught TypeError: Error resolving module specifier “.prisma/client/index-browser”. Relative module specifiers must start with “./”, “../” or “/”.
It references a piece of code that was compiled with "npm run build" in localhost:3000/_app/start-b07b1607.js:
...s-d1fb5791.js";import".prisma/client/index-browser";let Be="",et="";function ...
I have tried reproducing this error with using older versions of Prisma, the adaptor and Svelte, switching from pnpm to npm, but nothing helps. I have a MWE repository that comes close to reproducing the error but doesn't actually reproduce it at https://github.com/wvhulle/prisma-sveltekit-bug-report.
How come the Svelte compiler emits “.prisma/client/index-browser” as a module specifier? Is this an error in Prisma, Vite or something else? The dev mode works without problem.
The question seems to be related, but is about Vue, not about Svelte.
Thanks!
Removing the import of a Prisma enum type fixed the issue.
Somewhere in my code I had import an enum type. This seems to be apparently a Prisma problem.
So, remove any import { Enum } from '#prisma/client'; from your code.
See https://github.com/prisma/prisma/issues/12504

I have installed eslint on vite VueJS3 getting errors: The keyword 'interface' is undefined

On a project that compiled before I installed esLint I get errors.
It complains about Parsing error: The keyword 'interface' is reserved for a file that contains no such keyword. I moved the interface definitions to my common types.d.ts.
I don't know which configuration files will help you diagnose this, please ask if you know.

Unable to resolve path to module './package.json' in React native application

I am trying to get application version in my react native app.
To get app version, I have written following code.
import { version } from './package.json';
console.log(version.appVersion);
But, It's throwing error like following
[eslint] Unable to resolve path to module './package.json'. [import/no-unresolved]
Any suggestions?
I have fixed is some syntax error in package.json
Package.json data just check with https://jsonlint.com/ website wether it is valid json data or not.
I my case, There is one } symbol missed. So, Fixed. it.

unable to resolve external module typescript

I'm trying to build a project, but I keep getting compiler errors which say
Unable to resolve external module and Module cannot be aliased to a non-module type.
I have header file which contains all the typing reference path, but even when I try to reference the path in the same file, it still doesn't resolve the problem.
I ran into this error when I shouldn't have due to a bug with TypeScript 1.0.0, but was able to resolve it by upgrading to 1.0.1. Try doing that. If you still get the error, it's probably a bug in your code.

Resources