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

SCSS unit tests failing due to error in node package #86

Open
Velociraptor45 opened this issue Jul 29, 2023 · 0 comments
Open

SCSS unit tests failing due to error in node package #86

Velociraptor45 opened this issue Jul 29, 2023 · 0 comments

Comments

@Velociraptor45
Copy link

Installed product versions

  • Visual Studio: 2022 Community
  • This extension: 1.14.10

Description

Some SCSS unit tests are failing due to an error during the SCSS compilation.

Steps to recreate

  1. Clone the repo
  2. Remove the current WebCompiler folder from the temp directory
  3. Remove the node_modules.7z file from src/WebCompiler/Node if it exists
  4. Rebuild node_modules.7z
  5. Compile the solution
  6. Execute unit tests

Current behavior

The unit tests ScssTest.CompileScss and ScssTest.MultiLineComments are currently failing. If you put a breakpoint at the return in the ConfigFileProcessor line 195, you'll see an early exit because of an error during the compilation (error message below). It seems like this is caused by the AutoPrefix option because when I remove it from the scssconfig.json for example, the ScssTest.CompileScss still fails (because it evaluates for the AutoPrefix) but the compilation process itself is successful.

node:internal/modules/cjs/loader:933
  const err = new Error(message);
              ^

Error: Cannot find module '../doc/directives.js'
Require stack:
- C:\Users\david\AppData\Local\Temp\WebCompiler1.14.10\node_modules\yaml\dist\compose\composer.js
- C:\Users\david\AppData\Local\Temp\WebCompiler1.14.10\node_modules\yaml\dist\index.js
- C:\Users\david\AppData\Local\Temp\WebCompiler1.14.10\node_modules\postcss-load-config\src\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.<anonymous> (C:\Users\david\AppData\Local\Temp\WebCompiler1.14.10\node_modules\yaml\dist\compose\composer.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\david\\AppData\\Local\\Temp\\WebCompiler1.14.10\\node_modules\\yaml\\dist\\compose\\composer.js',
    'C:\\Users\\david\\AppData\\Local\\Temp\\WebCompiler1.14.10\\node_modules\\yaml\\dist\\index.js',
    'C:\\Users\\david\\AppData\\Local\\Temp\\WebCompiler1.14.10\\node_modules\\postcss-load-config\\src\\index.js'
  ]
}

Expected behavior

All unit tests are green.

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