Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEP0148] DeprecationWarning #11

Open
sidwebworks opened this issue Dec 16, 2021 · 3 comments · Fixed by #12
Open

[DEP0148] DeprecationWarning #11

sidwebworks opened this issue Dec 16, 2021 · 3 comments · Fixed by #12

Comments

@sidwebworks
Copy link
Contributor

sidwebworks commented Dec 16, 2021

Hi I am using this package inside my CLI tool and it looks like npm is giving me a deprecation warning from this package.

This is what I got.

(node:64707) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /usr/local/lib/node_modules/quick-strapper/node_modules/kolorist/package.json.
Update this package.json to use a subpath pattern like "./*".
  • NPM version: 8.1.2
  • NODE version: 16.3.2
  • Kolorist version: "^1.5.0"
@sidwebworks
Copy link
Contributor Author

@marvinhagemeister I think we will have to re-open this again, Just noticed this right now, Looks like changing the exports field like the warning mentioned doesn't fix the issue, instead it's an breaking change.

image

@sidwebworks
Copy link
Contributor Author

But it's weird because that's what's Postcss also did to remove this deprecation warning

@sidwebworks
Copy link
Contributor Author

Okay I can confirm now, tested twice, Modifying the exports field to this instead fixes the issue.

"exports": {
		".": {
			"browser": "./dist/module/index.js",
			"import": "./dist/esm/index.mjs",
			"require": "./dist/cjs/index.js"
		},
		"./package.json": "./package.json",
		"./dist/module": "./dist/module/index.js",
		"./dist/esm": "./dist/esm/index.mjs",
		"./dist/cjs": "./dist/cjs/index.js"
	},

image

Again sorry for the previous change I worked fine for my CLI locally back then, I guess it was globally installed so didn't gave this error.

So is this fine? should I add a PR for this or something?

@marvinhagemeister

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants