You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We're currently migrating a monorepo from nx to pnpm workspaces, and histoire dev is failing with:
Error while collecting story [foo].story.vue:
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '[foo]' is not supported resolving ES modules imported from [foo]
ERR_UNSUPPORTED_DIR_IMPORT issues are mentioned in #712 and #696 with workarounds of either pinning mlly to 1.4.2, or using viteNodeInlineDeps for problematic packages.
This PR bumps vite, vite-node, and nuxt packages, and adds a small fix to isCollecting as tsc was failing on PluginContextMeta.
Tests are passing, build is building, and histoire dev is running successfully.
Edit: looks like previews are failing with a node and pnpm version mismatch in the root package.json, assume the answer is bumping the node version in engines, but will hold off on that.
Just in case this helps anyone, this is working in the meantime:
When I apply the overrides I get another, but different error (see below)
Error while collecting story /src/components/button/Base.story.vue:
TypeError [ERR_PACKAGE_IMPORT_NOT_DEFINED]: Package import specifier "#build/nuxt.config.mjs" is not defined in package /src/node_modules/nuxt/package.json imported from /src/node_modules/nuxt/dist/app/nuxt.js
at importNotDefined (node:internal/modules/esm/resolve:291:10)
at packageImportsResolve (node:internal/modules/esm/resolve:741:9)
at moduleResolve (node:internal/modules/esm/resolve:917:16)
at defaultResolve (node:internal/modules/esm/resolve:1169:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40)
at link (node:internal/modules/esm/module_job:95:36)
I use npm so the below the overrides in npm style (did bump the nuxt verion, however error occurs also in version you mention):
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We're currently migrating a monorepo from nx to pnpm workspaces, and
histoire dev
is failing with:ERR_UNSUPPORTED_DIR_IMPORT issues are mentioned in #712 and #696 with workarounds of either pinning mlly to 1.4.2, or using viteNodeInlineDeps for problematic packages.
This PR bumps vite, vite-node, and nuxt packages, and adds a small fix to
isCollecting
as tsc was failing onPluginContextMeta
.Tests are passing, build is building, and
histoire dev
is running successfully.Edit: looks like previews are failing with a node and pnpm version mismatch in the root package.json, assume the answer is bumping the node version in engines, but will hold off on that.
Just in case this helps anyone, this is working in the meantime:
What is the purpose of this pull request?