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

[Bug]: Error with sass-loader #156

Closed
pchakour opened this issue May 31, 2024 · 2 comments
Closed

[Bug]: Error with sass-loader #156

pchakour opened this issue May 31, 2024 · 2 comments
Labels
bug Something isn't working untriaged Requires traige

Comments

@pchakour
Copy link

What happened?

Hello guys !

When I use the webpack_rule with the sass-loader plugin, I get the following error:

Error: Module build failed (from ./node_modules/.aspect_rules_js/[email protected]_-1555667799/node_modules/sass-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, scandir '/home/hawk/.cache/bazel/_bazel_hawk/95f259d6e4737beb07c4caece75fc2f5/sandbox/processwrapper-sandbox/6394/execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/[email protected]/node_modules/node-sass/vendor'

The webpack target is configure like this in my BUILD.bazel:

webpack_bundle(
  name = "desktop_frontend",
  output_dir = True,
  node_modules = "//:node_modules",
  webpack_config = "src/desktop/frontend/webpack.config.js",
  entry_point = "src/desktop/frontend/index.js",
  deps = [
    ":transpile",
    "//:node_modules/webpack-cli",
    "//:node_modules/mini-css-extract-plugin",
    "//:node_modules/terser-webpack-plugin",
    "//:node_modules/css-minimizer-webpack-plugin",
    "//:node_modules/webpack-bundle-analyzer",
    "//:node_modules/css-loader",
    "//:node_modules/style-loader",
    "//:node_modules/sass-loader",
    "//:node_modules/node-sass",
    "//:node_modules/mdast-util-to-hast",
    "//:node_modules/unist-util-visit",
    "//:node_modules/stylis",
  ],
  srcs = glob([
    'src/desktop/frontend/**/*.html',
    'src/desktop/frontend/**/*.scss',
    'src/desktop/frontend/**/*.css',
    'src/desktop/frontend/**/*.png',
    'src/desktop/frontend/**/*.jpg',
    'src/desktop/frontend/**/*.ico',
  ]),
)

Where the target transpile is a target to compile my typescript.

Did I do something wrong ?

Version

Development (host) and target OS/architectures:

Output of bazel --version: bazel 7.1.2

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

Language(s) and/or frameworks involved:

How to reproduce

No response

Any other information?

No response

@pchakour pchakour added the bug Something isn't working label May 31, 2024
@github-actions github-actions bot added the untriaged Requires traige label May 31, 2024
@pchakour pchakour changed the title [Bug]: [Bug]: Error with sass-loader May 31, 2024
@pchakour
Copy link
Author

pchakour commented Jun 3, 2024

I fixed my problem !

I updated node-sass to sass and everything works perfectly :-)

@jbedard
Copy link
Member

jbedard commented Jun 4, 2024

Since node-sass is deprecated I think that is the correct solution and I'll close this one 👍

@jbedard jbedard closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

2 participants