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

USWDS-Compile - Bug: Platform specific sass-embedded modules are missing from package lock #110

Closed
2 tasks done
mdmower-csnw opened this issue Jul 15, 2024 · 3 comments · Fixed by #111
Closed
2 tasks done
Labels
Affects: Compiling Related to compiling Sass or JavaScript Affects: Dependencies Relates to project dependencies Type: Bug A problem in the code
Milestone

Comments

@mdmower-csnw
Copy link
Contributor

Describe the bug

This only affects the develop branch; it is a regression introduced by #96. Platform specific sass-embedded modules are missing for all but darwin-arm64. This results in a compilation error when any other platform is used to run npm run init after cleanly installing packages.

Steps to reproduce the bug

Tested on both Windows x64 and Debian 12 x64:

git checkout develop # reset to match upstream if needed
npm ci
npm run init

Error from Windows:

npm run init

> @uswds/[email protected] init
> gulp init

Error: Embedded Dart Sass couldn't find the embedded compiler executable. Please make sure the optional dependency sass-embedded-win32-x64 is installed in node_modules.

Error from Linux:

npm run init

> @uswds/[email protected] init
> gulp init

Error: Embedded Dart Sass couldn't find the embedded compiler executable. Please make sure the optional dependency sass-embedded-linux-x64 is installed in node_modules.

Expected Behavior

Compilation should succeed because the platform specific sass-modules are installed.

Related code

main branch:

"optionalDependencies": {
"sass-embedded-darwin-arm64": "1.69.5",
"sass-embedded-darwin-x64": "1.69.5",
"sass-embedded-linux-arm": "1.69.5",
"sass-embedded-linux-arm64": "1.69.5",
"sass-embedded-linux-ia32": "1.69.5",
"sass-embedded-linux-x64": "1.69.5",
"sass-embedded-win32-ia32": "1.69.5",
"sass-embedded-win32-x64": "1.69.5"
}
},
"node_modules/sass-embedded-darwin-arm64": {
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.69.5.tgz",
"integrity": "sha512-zVuXJzgT54t24E4QPP/iteHsw/cawZE8gAXGEm20cP2DKsIQBF7bvSTk0zzY0bS01YFtJviYM13HcGUe4q7/7w==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"bin": {
"sass": "dart-sass/sass"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-embedded-darwin-x64": {
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.69.5.tgz",
"integrity": "sha512-HcA9YER3Ax7lMnHouxnIY462gnst5lNL56QXkZaTQmg9nH7oqR2bMfWbckEQL+mHIXGSM/QfX0aD59VOm5iKZw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"bin": {
"sass": "dart-sass/sass"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-embedded-linux-arm": {
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.69.5.tgz",
"integrity": "sha512-m0NxVkrfcS3UsF33q0FgItMWIz/F1FZdfVZpjp+dP6qd0KLeTuoPUCh2GSize0DAU5T0Zj24b2mXeowDKv463g==",
"cpu": [
"arm"
],
"optional": true,
"os": [
"linux"
],
"bin": {
"sass": "dart-sass/sass"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-embedded-linux-arm64": {
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.69.5.tgz",
"integrity": "sha512-HWCjdFSLGh0dMUNLNh+slc2j9koSZnfTEO9qQR6WEIuC+We6vYKJugGPo1V9pFbBeoW6VAJGYdlqsRPquteCZw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"bin": {
"sass": "dart-sass/sass"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-embedded-linux-ia32": {
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass-embedded-linux-ia32/-/sass-embedded-linux-ia32-1.69.5.tgz",
"integrity": "sha512-0taR6AJDb+eLOBTEMc1nfX2fI1hgRF9M+Hmv+wwGrxfBu/MkASk6fmR9B8MDw9hPHIqGVUkTVizjOh50O7nIKg==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"linux"
],
"bin": {
"sass": "dart-sass/sass"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-embedded-linux-x64": {
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.69.5.tgz",
"integrity": "sha512-gN9yLTbKC0hUHukx4mdRs4V39WD719PM2GhWQBUA+3Z8qr9ywywi7LiU2atWrKESRF34V+eqF9lYiYVQxtTHZw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"bin": {
"sass": "dart-sass/sass"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-embedded-win32-ia32": {
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass-embedded-win32-ia32/-/sass-embedded-win32-ia32-1.69.5.tgz",
"integrity": "sha512-9OgSaufHP53b33gaH1Y5NZ/Im3druCHIQvLUEqJBCFuOzly47g/hZGrO+dBDiWgYGYKbSYI7Z4/PBtQoK5Vkxg==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"win32"
],
"bin": {
"sass": "dart-sass/sass.bat"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-embedded-win32-x64": {
"version": "1.69.5",
"resolved": "https://registry.npmjs.org/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.69.5.tgz",
"integrity": "sha512-p1PsOJnpwXdPfiRbX6QdRa4PnL2QXPpIRy8fkeAZpQFYZ278ZIlwemC2MukKMVLcE3iQ5lBulbC8IYm91rod6Q==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"bin": {
"sass": "dart-sass/sass.bat"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-embedded/node_modules/supports-color": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},

develop branch:

"optionalDependencies": {
"sass-embedded-android-arm": "1.77.5",
"sass-embedded-android-arm64": "1.77.5",
"sass-embedded-android-ia32": "1.77.5",
"sass-embedded-android-x64": "1.77.5",
"sass-embedded-darwin-arm64": "1.77.5",
"sass-embedded-darwin-x64": "1.77.5",
"sass-embedded-linux-arm": "1.77.5",
"sass-embedded-linux-arm64": "1.77.5",
"sass-embedded-linux-ia32": "1.77.5",
"sass-embedded-linux-musl-arm": "1.77.5",
"sass-embedded-linux-musl-arm64": "1.77.5",
"sass-embedded-linux-musl-ia32": "1.77.5",
"sass-embedded-linux-musl-x64": "1.77.5",
"sass-embedded-linux-x64": "1.77.5",
"sass-embedded-win32-arm64": "1.77.5",
"sass-embedded-win32-ia32": "1.77.5",
"sass-embedded-win32-x64": "1.77.5"
}
},
"node_modules/sass-embedded-darwin-arm64": {
"version": "1.77.5",
"resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.77.5.tgz",
"integrity": "sha512-J3yP6w+xqPrGQE0+sO4Gam6kBDJL5ivgkFNxR0fVlvKeN5qVFYhymp/xGRRMxBrKjohEQtBGP431EzrtvUMFow==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"bin": {
"sass": "dart-sass/sass"
},
"engines": {
"node": ">=14.0.0"
}
},

Screenshots

No response

System setup

No response

Additional context

I would normally suggest regenerating package-lock.json entirely...

rm -rf node_modules/
rm package-lock.json
npm install

... but you'd have to be willing to accept any version bumps in other packages that meet the version criteria from package.json. So, if that's not acceptable, focus on just sass-embedded:

npm uninstall --save sass-embedded
npm install --save [email protected]
# edit package.json to remove ^ from version so that it matches the current restriction of using an exact version
npm install

Code of Conduct

@mdmower-csnw mdmower-csnw added Needs: Confirmation We need to confirm that this is an issue Type: Bug A problem in the code labels Jul 15, 2024
@github-actions github-actions bot added the Status: Triage We're triaging this issue and grooming if necessary label Jul 15, 2024
@mejiaj mejiaj added this to the compile 1.2.0 milestone Jul 15, 2024
@mejiaj mejiaj moved this to Ready to Schedule in USWDS Core Project Data Jul 15, 2024
@mejiaj mejiaj added Affects: Dependencies Relates to project dependencies and removed Status: Triage We're triaging this issue and grooming if necessary labels Jul 15, 2024
@mahoneycm
Copy link
Contributor

Hey there @mdmower-csnw, thanks for catching this!

I wasn't able to recreate this on my machine but we experienced as similar issue on USWDS-Site. We were able to resolve it by installing sass-embedded's optional dependences.

I created #111 to see if this would resolve the issue for you. Would you mind checking to see if this resolves the error on your machines?

Thanks!

@mdmower-csnw
Copy link
Contributor Author

@mahoneycm

I created #111 to see if this would resolve the issue for you. Would you mind checking to see if this resolves the error on your machines?

The updates to package-lock.json look complete (matches list of optionalDependencies for sass-embedded) and I verified I can compile successfully on both Windows 11 64bit and Debian 12 64bit.

@mejiaj
Copy link
Contributor

mejiaj commented Jul 16, 2024

Confirming error on win11 x64.

Windows PowerShell 7_16_2024 8_27_57 AM

@mejiaj mejiaj moved this from Ready to Schedule to Review in USWDS Core Project Data Jul 16, 2024
@mejiaj mejiaj moved this from Review to Fed Final Review in USWDS Core Project Data Jul 16, 2024
@mejiaj mejiaj added Affects: Compiling Related to compiling Sass or JavaScript and removed Needs: Confirmation We need to confirm that this is an issue labels Jul 16, 2024
@github-project-automation github-project-automation bot moved this from Fed Final Review to Done in USWDS Core Project Data Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Compiling Related to compiling Sass or JavaScript Affects: Dependencies Relates to project dependencies Type: Bug A problem in the code
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants