I am stuck with trying to upgrade a v2 Meteor project to v3, I keep getting the following error, even after running meteor npm install --save unist-util-visit-parents #minpath #minproc #minurl
Unable to resolve some modules:
“unist-util-visit-parents/do-not-use-color” in /Users//Documents/development//app/node_modules/unist-util-visit-parents/lib/index.js
(web.browser.legacy)
“#minpath” in /Users//Documents/development//app/node_modules/vfile/lib/index.js (web.browser.legacy)
“#minproc” in /Users//Documents/development//app/node_modules/vfile/lib/index.js (web.browser.legacy)
“#minurl” in /Users//Documents/development//app/node_modules/vfile/lib/index.js (web.browser.legacy)
If you notice problems related to these missing modules, consider running:
I have not updated all the legacy files yet. … but though I’d try and get to the point NPM and all the packages were OK first before upgrading all the files
Meteor does support ESM. It looks like the package uses the package.json imports field, which Meteor does not support. If it worked previously with Meteor 2, you might have updated to an incompatible version.
Meteor might support it in the next few months. Once Meteor supports package.json exports, it should be straightforward to add support for the package.json imports field.
re: @paulishca thanks, I had already found that one… re ESM - yep I know I have been using modern ESM stuff for a while.
thanks … yep, I think my package.json is broken/needs updating. I created a fresh test project with v3 and tried to apply similar changes to my existing package.json … but seem to have broken something.
This error is from the npm package vfile having an imports field in their package.json. Using an older version of the npm package that doesn’t use it or switching to a different package would fix the problem.
There’s a similar problem with unist-util-visit-parents, which uses the package.json exports field.