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

Issue with module or pnpm? #2001

Closed
IanKemp opened this issue Sep 6, 2019 · 5 comments
Closed

Issue with module or pnpm? #2001

IanKemp opened this issue Sep 6, 2019 · 5 comments

Comments

@IanKemp
Copy link

IanKemp commented Sep 6, 2019

One of our explicit dependencies in package.json is @material/react-dialog which depends on @material/dialog which depends on @material/animation. However the @material modules' SASS files include files using a semi-absolute path, e.g.:

@import "@material/animation/functions";

which when used with pnpm causes:

./src/App.scss (./node_modules/.registry.npmjs.org/css-loader/2.1.1_webpack@4.39.1/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/.registry.npmjs.org/postcss-loader/3.0.0/node_modules/postcss-loader/src??postcss!./node_modules/.registry.npmjs.org/resolve-url-loader/3.1.0/node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/.registry.npmjs.org/sass-loader/7.2.0_webpack@4.39.1/node_modules/sass-loader/lib/loader.js??ref--6-oneOf-5-4!./src/App.scss)
undefined
^
      File to import not found or unreadable: @material/animation/functions.
      in C:\path\to\my\project\node_modules\.registry.npmjs.org\@material\dialog\2.3.0\node_modules\@material\dialog\_mixins.scss (line 23, column 1)

This can be fixed by changing the imports to be

@import "../animation/functions";

but obviously I don't want to make this change.

@material works fine when I use --shamefully-flatten, but obviously that defeats the purpose of using pnpm.

  • Is this an issue with @material, or pnpm?
  • If @material, what would need to be changed/fixed to make it work correctly with pnpm?
  • If pnpm is at fault, is this a known issue or a new bug?
@zkochan
Copy link
Member

zkochan commented Sep 9, 2019

Try with pnpm v4.0.0-0

@IanKemp
Copy link
Author

IanKemp commented Sep 10, 2019

Try with pnpm v4.0.0-0

Issue remains.

@zkochan
Copy link
Member

zkochan commented Sep 10, 2019

Can you create a small repository that reproduces this issue?

@merceyz
Copy link

merceyz commented Oct 31, 2020

Probably fixed with webpack-contrib/sass-loader#875

@zkochan
Copy link
Member

zkochan commented May 8, 2022

This was/is not an issue with pnpm if it works with --shamefully-hoist

@zkochan zkochan closed this as completed May 8, 2022
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

3 participants