ENOTDIR in Nuxt bridge with pinia v0.4.0+
Trying to upgrade to v0.4.0 with Nuxt bridge and trying to build the application gives me:
ERROR Rollup error: ENOTDIR: not a directory, stat '/.../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/pinia/dist/pinia.mjs/dist/pinia'
FATAL ENOTDIR: not a directory, stat '/.../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/pinia/dist/pinia.mjs/dist/pinia'
Here you go: https://codesandbox.io/s/nuxt-pinia-evblty
Run a yarn build to reproduce the error.
Originally posted by @dargmuesli in https://github.com/vuejs/pinia/discussions/1582.
Upgrading @uppy/core and @uppy/tus to v3 gave me the typical missing transpilation issues in dev. Adding
'@uppy/companion-client',
'@uppy/core',
'@uppy/store-default',
'@uppy/tus',
'@uppy/utils',
'nanoid',
to the transpile error makes dev accessible again, but yields the following error on build:
ERROR Rollup error: ENOTDIR: not a directory, stat '/.../node_modules/.pnpm/node_modules/tus-js-client/lib.es5/browser/index.js/lib.es5/browser'
FATAL ENOTDIR: not a directory, stat '/.../node_modules/.pnpm/node_modules/tus-js-client/lib.es5/browser/index.js/lib.es5/browser'
I do have the alias 'tus-js-client': 'tus-js-client/lib.es5/browser/index.js' still set up, and it seems I cannot remove it yet.
That rollup import path sounds much like the pinia issue. I'm wondering why those errors only appear under those upgrade circumstances though? :D
Same error here with yarn generate:
Nuxt Fatal Error
Error: ENOTDIR: not a directory, stat
node_modules/pinia/dist/pinia.mjs/dist/pinia
In this case you can work around it by adding pinia to your build.transpile array:
import { defineNuxtConfig } from '@nuxt/bridge'
export default defineNuxtConfig({
modules: ['@pinia/nuxt'],
build: {
transpile: ['pinia'],
},
})
@danielroe That worked, thank you 👍