Skip to content

Error resolving preset within config file #1221

@nwhittaker

Description

@nwhittaker

Possibly related to #1185. The plugin is throwing an error during initialization. It appears to no longer be able to follow one of the preset paths.

The project is in a monorepo using pnpm to manage dependencies. The preset file exists as a dependency of the parent project. The tailwind config exists in a child project. As a result, the child project's dependency is a symlink to the parent project's dependency.

The underscores in the stack trace are placeholders to privatize the name of the dependency while maintaining the line length.

[Global] Initializing projects...
[packages/child-project/config/tailwind.config.js] Initializing...
[packages/child-project/config/tailwind.config.js] supported features: ["layer:base","separator:root","content-list","jit","css-at-config-as-project","relative-content-paths","transpiled-configs"]
[packages/child-project/config/tailwind.config.js] Loaded tailwindcss v3.4.17: /parent-project/node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]__@[email protected][email protected]_/node_modules/tailwindcss
[packages/child-project/config/tailwind.config.js] Loaded Tailwind CSS config file: /parent-project/packages/child-project/config/tailwind.config.js
[packages/child-project/config/tailwind.config.js] Loaded postcss v8.5.1: /parent-project/node_modules/.pnpm/[email protected]/node_modules/postcss
[packages/child-project/config/tailwind.config.js] Building...
[Error - 2:10:18 PM] Unable to load config file at: /parent-project/packages/child-project/config/tailwind.config.js
[Error - 2:10:18 PM] TypeError [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '/parent-project/node_modules/.pnpm/____________________@[email protected]+___________________________...
    at readFileSync (node:fs:448:42)
    at t.readFileSync (node:electron/js2c/node_init:2:10175)
    at require.readFileSync (eval at <anonymous> (/Users/username/.vscode/extensions/bradlc.vscode-tailwindcss-0.14.6/dist/tailwindServer.js:3548:800), <anonymous>:9:14)
    at jiti (/parent-project/node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:245281)
    at /parent-project/packages/child-project/config/tailwind.config.js:5:5
    at evalModule (/parent-project/node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:247313)
    at jiti (/parent-project/node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:245241)
    at /parent-project/node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]__@[email protected][email protected]_/node_modules/tailwindcss/lib/lib/load-config.js:52:26
    at Object.loadConfig [as module] (/parent-project/node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]__@[email protected][email protected]_/node_modules/tailwindcss/lib/lib/load-config.js:62:6)
    at D (/Users/username/.vscode/extensions/bradlc.vscode-tailwindcss-0.14.6/dist/tailwindServer.js:3542:11614) {
  code: 'ERR_INVALID_ARG_VALUE'
}
[Global] Initialized 1 projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions