Open fary58 opened 1 month ago
npm i normalize-url@npm:@esm2cjs/normalize-url
but npm might dedupe this incorrectly when other packages depend on the replaced package. If you can, prefer using the scoped package directly:
npm i @esm2cjs/normalize-url
// Using ESM import syntax import normalizeUrl from "@esm2cjs/normalize-url";
import normalizeUrl from "@esm2cjs/normalize-url";
// Using CommonJS require() const normalizeUrl = require("@esm2cjs/normalize-url").default;
const normalizeUrl = require("@esm2cjs/normalize-url").default;
I want to fix it can I ?
Yes you can just follow the instructions step by step.
You can use an npm alias to install this package under the original name:
npm i normalize-url@npm:@esm2cjs/normalize-url
but npm might dedupe this incorrectly when other packages depend on the replaced package. If you can, prefer using the scoped package directly:
npm i @esm2cjs/normalize-url
Usage
// Using ESM import syntax
import normalizeUrl from "@esm2cjs/normalize-url";
// Using CommonJS require()
const normalizeUrl = require("@esm2cjs/normalize-url").default;