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

Fail to load a dependency with # in the filename #16597

Closed
7 tasks done
dcaillibaud opened this issue May 4, 2024 · 2 comments
Closed
7 tasks done

Fail to load a dependency with # in the filename #16597

dcaillibaud opened this issue May 4, 2024 · 2 comments

Comments

@dcaillibaud
Copy link

Describe the bug

Since pnpm upgrade from v8 to v9, dependencies files can have # in their name, and vite fails to compile them Error: [vite:css] [postcss] ENOENT: no such file or directory

Reproduction

https://git.sesamath.net/sesamath/sesaparcours.git

Steps to reproduce

# install pnpm package manager
npm i -g pnpm
# clone a repo with https dependencies
git clone https://git.sesamath.net/sesamath/sesaparcours.git
cd sesaparcours
# install dependencies with pnpm
pnpm i
# build with vite (vite/5.2.6 linux-x64 node-v20.5.1)
vite build

=>

vite v5.2.6 building for production...
✓ 637 modules transformed.
x Build failed in 4.41s
error during build:
Error: [vite:css] [postcss] ENOENT: no such file or directory, open '/home/daniel/tmp/sesaparcours/node_modules/.pnpm/@sesatheque-plugins+arbre@git+https+++git.sesamath.net+sesamath+sesatheque-plugin-arbre.git'
file: /home/daniel/tmp/sesaparcours/node_modules/.pnpm/@sesatheque-plugins+arbre@git+https+++git.sesamath.net+sesamath+sesatheque-plugin-arbre.git#d_wqzhegxz6itmlvnxp64vllaxoy/node_modules/@sesatheque-plugins/arbre/public/arbre.css:undefined:NaN

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 25.10 GB / 31.09 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 20.5.1 - /usr/bin/node
    npm: 10.7.0 - /usr/bin/npm
    pnpm: 9.0.6 - /usr/bin/pnpm
  Browsers:
    Chrome: 124.0.6367.118
    Chromium: 124.0.6367.118
  npmPackages:
    vite: ^5.2.6 => 5.2.6

Used Package Manager

npm

Logs

Click to expand!
  vite:config bundled config file loaded in 63.75ms +0ms
  vite:config using resolved config: {
  vite:config   root: '/home/daniel/tmp/sesaparcours',
  vite:config   base: './',
  vite:config   build: {
  vite:config     target: [ 'es2020', 'edge88', 'firefox78', 'chrome87', 'safari14' ],
  vite:config     cssTarget: [ 'es2020', 'edge88', 'firefox78', 'chrome87', 'safari14' ],
  vite:config     outDir: 'docroot',
  vite:config     assetsDir: 'build',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: true,
  vite:config     sourcemap: true,
  vite:config     rollupOptions: { input: [Object], output: [Object], maxParallelFileOps: 2 },
  vite:config     minify: 'esbuild',
  vite:config     terserOptions: {},
  vite:config     write: true,
  vite:config     emptyOutDir: false,
  vite:config     copyPublicDir: true,
  vite:config     manifest: false,
  vite:config     lib: false,
  vite:config     ssr: false,
  vite:config     ssrManifest: false,
  vite:config     ssrEmitAssets: false,
  vite:config     reportCompressedSize: false,
  vite:config     chunkSizeWarningLimit: 500,
  vite:config     watch: null,
  vite:config     commonjsOptions: { include: [Array], extensions: [Array] },
  vite:config     dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] },
  vite:config     modulePreload: { polyfill: true },
  vite:config     cssMinify: true
  vite:config   },
  vite:config   plugins: [
  vite:config     'vite:build-metadata',
  vite:config     'vite:watch-package-data',
  vite:config     'vite:pre-alias',
  vite:config     'alias',
  vite:config     'vite:modulepreload-polyfill',
  vite:config     'vite:resolve',
  vite:config     'vite:html-inline-proxy',
  vite:config     'vite:css',
  vite:config     'vite:esbuild',
  vite:config     'vite:json',
  vite:config     'vite:wasm-helper',
  vite:config     'vite:worker',
  vite:config     'vite:asset',
  vite:config     'vite-plugin-dynamic-import',
  vite:config     'vite:wasm-fallback',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:build-html',
  vite:config     'vite:worker-import-meta-url',
  vite:config     'vite:asset-import-meta-url',
  vite:config     'vite:force-systemjs-wrap-complete',
  vite:config     'commonjs',
  vite:config     'vite:data-uri',
  vite:config     'vite:dynamic-import-vars',
  vite:config     'vite:import-glob',
  vite:config     'vite:build-import-analysis',
  vite:config     'vite:esbuild-transpile',
  vite:config     'vite:terser',
  vite:config     'vite:reporter',
  vite:config     'vite:load-fallback'
  vite:config   ],
  vite:config   resolve: {
  vite:config     mainFields: [ 'browser', 'module', 'jsnext:main', 'jsnext' ],
  vite:config     conditions: [],
  vite:config     extensions: [
  vite:config       '.mjs',  '.js',
  vite:config       '.mts',  '.ts',
  vite:config       '.jsx',  '.tsx',
  vite:config       '.json'
  vite:config     ],
  vite:config     dedupe: [ 'jquery', 'jquery-ui' ],
  vite:config     preserveSymlinks: false,
  vite:config     alias: [ [Object], [Object], [Object], [Object], [Object], [Object] ]
  vite:config   },
  vite:config   server: {
  vite:config     preTransformRequests: true,
  vite:config     open: true,
  vite:config     host: 'localhost',
  vite:config     port: 8081,
  vite:config     strictPort: true,
  vite:config     sourcemapIgnoreList: [Function: isInNodeModules$1],
  vite:config     middlewareMode: false,
  vite:config     fs: {
  vite:config       strict: true,
  vite:config       allow: [Array],
  vite:config       deny: [Array],
  vite:config       cachedChecks: undefined
  vite:config     }
  vite:config   },
  vite:config   configFile: '/home/daniel/tmp/sesaparcours/vite.config.js',
  vite:config   configFileDependencies: [ '/home/daniel/tmp/sesaparcours/vite.config.js' ],
  vite:config   inlineConfig: {
  vite:config     root: undefined,
  vite:config     base: undefined,
  vite:config     mode: undefined,
  vite:config     configFile: undefined,
  vite:config     logLevel: undefined,
  vite:config     clearScreen: undefined,
  vite:config     build: {}
  vite:config   },
  vite:config   rawBase: './',
  vite:config   publicDir: '/home/daniel/tmp/sesaparcours/public',
  vite:config   cacheDir: '/home/daniel/tmp/sesaparcours/node_modules/.vite',
  vite:config   command: 'build',
  vite:config   mode: 'production',
  vite:config   ssr: {
  vite:config     target: 'node',
  vite:config     optimizeDeps: { noDiscovery: true, esbuildOptions: [Object] }
  vite:config   },
  vite:config   isWorker: false,
  vite:config   mainConfig: null,
  vite:config   bundleChain: [],
  vite:config   isProduction: true,
  vite:config   css: { lightningcss: undefined },
  vite:config   esbuild: { jsxDev: false },
  vite:config   preview: {
  vite:config     port: undefined,
  vite:config     strictPort: true,
  vite:config     host: 'localhost',
  vite:config     https: undefined,
  vite:config     open: true,
  vite:config     proxy: undefined,
  vite:config     cors: undefined,
  vite:config     headers: undefined
  vite:config   },
  vite:config   envDir: '/home/daniel/tmp/sesaparcours',
  vite:config   env: { BASE_URL: './', MODE: 'production', DEV: false, PROD: true },
  vite:config   assetsInclude: [Function: assetsInclude],
  vite:config   logger: {
  vite:config     hasWarned: false,
  vite:config     info: [Function: info],
  vite:config     warn: [Function: warn],
  vite:config     warnOnce: [Function: warnOnce],
  vite:config     error: [Function: error],
  vite:config     clearScreen: [Function: clearScreen],
  vite:config     hasErrorLogged: [Function: hasErrorLogged]
  vite:config   },
  vite:config   packageCache: Map(1) {
  vite:config     'fnpd_/home/daniel/tmp/sesaparcours' => {
  vite:config       dir: '/home/daniel/tmp/sesaparcours',
  vite:config       data: [Object],
  vite:config       hasSideEffects: [Function: hasSideEffects],
  vite:config       webResolvedImports: {},
  vite:config       nodeResolvedImports: {},
  vite:config       setResolvedCache: [Function: setResolvedCache],
  vite:config       getResolvedCache: [Function: getResolvedCache]
  vite:config     },
  vite:config     set: [Function (anonymous)]
  vite:config   },
  vite:config   createResolver: [Function: createResolver],
  vite:config   optimizeDeps: {
  vite:config     holdUntilCrawlEnd: true,
  vite:config     esbuildOptions: { preserveSymlinks: false, plugins: [Array] }
  vite:config   },
  vite:config   worker: { format: 'iife', plugins: '() => plugins', rollupOptions: {} },
  vite:config   appType: 'spa',
  vite:config   experimental: { importGlobRestoreExtension: false, hmrPartialAccept: false },
  vite:config   getSortedPlugins: [Function: getSortedPlugins],
  vite:config   getSortedPluginHooks: [Function: getSortedPluginHooks]
  vite:config } +19ms
vite v5.2.6 building for production...
transforming (1) iframe.html  vite:resolve 0.09ms ./buildStats -> null +0ms
  vite:resolve 0.02ms ./buildUsageTree -> null +7ms
  vite:resolve 0.08ms ../lazyLoader -> null +22ms
  vite:resolve 0.01ms /home/daniel/tmp/sesaparcours/src/dev/start.form -> null +0ms
[…snip…]
  vite:resolve 1.05ms images/eye_javis_perez.svg -> /home/daniel/tmp/sesaparcours/node_modules/.pnpm/@sesatheque-plugins+arbre@git+https+++git.sesamath.net+sesamath+sesatheque-plugin-arbre.git#d_wqzhegxz6itmlvnxp64vllaxoy/node_modules/@sesatheque-plugins/arbre/public/images/eye_javis_perez.svg +0ms
✓ 637 modules transformed.
x Build failed in 4.44s
error during build:
Error: [vite:css] [postcss] ENOENT: no such file or directory, open '/home/daniel/tmp/sesaparcours/node_modules/.pnpm/@sesatheque-plugins+arbre@git+https+++git.sesamath.net+sesamath+sesatheque-plugin-arbre.git'
file: /home/daniel/tmp/sesaparcours/node_modules/.pnpm/@sesatheque-plugins+arbre@git+https+++git.sesamath.net+sesamath+sesatheque-plugin-arbre.git#d_wqzhegxz6itmlvnxp64vllaxoy/node_modules/@sesatheque-plugins/arbre/public/arbre.css:undefined:NaN

Validations

@dcaillibaud dcaillibaud changed the title Fail to load a dependencie with # in the filename Fail to load a dependency with # in the filename May 4, 2024
@bluwy
Copy link
Member

bluwy commented May 8, 2024

Can you provide a smaller repro? Usually repros are projects that start from scratch that shows the bug specifically.

Copy link

github-actions bot commented May 8, 2024

Hello @dcaillibaud. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants