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

[webpack-scripts] are broken in folders with spaces due to postcss-normalize #82

Open
ThaNarie opened this issue Sep 29, 2022 · 0 comments

Comments

@ThaNarie
Copy link
Member

> pota dev

Error loading dependency '@pota/react-webpack-scripts/config':
Error: Cannot find module '@csstools/normalize.css'
Require stack:
- /Users/xxx/Desktop/MediaMonks%20Working%20Directory/xxx/node_modules/postcss-normalize/index.mjs
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at resolve (file:///Users/xxx/Desktop/MediaMonks%20Working%20Directory/xxx/node_modules/postcss-normalize/index.mjs:57:46)
    at file:///Users/xxx/Desktop/MediaMonks%20Working%20Directory/xxx/node_modules/postcss-normalize/index.mjs:15:22
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
    at async loadDependencies (file:///Users/xxx/Desktop/MediaMonks%20Working%20Directory/xxx/node_modules/@pota/cli/lib/createCommand.js:48:51)
    at async file:///Users/xxx/Desktop/MediaMonks%20Working%20Directory/xxx/node_modules/@pota/cli/lib/createCommand.js:68:30 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/xxx/Desktop/MediaMonks%20Working%20Directory/xxx/node_modules/postcss-normalize/index.mjs'
  ]
}

This is because postcss-normalize has a funky way of resolving modules.

For now, a solution would be to create a big warning (or even abort with an error), if users are running pota-cli in a project folder that has spaces somewhere in the path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant