Draft
Conversation
Co-authored-by: trntv <1162056+trntv@users.noreply.github.com>
Co-authored-by: trntv <1162056+trntv@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix npm run build error due to missing module 'less'
Add less as explicit devDependency
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm run buildfails with "Cannot find module 'less'" on npm 3-6, which don't auto-install peer dependencies.Changes
less@^2.7.3to devDependencies in package.jsonless-loader@3.0.0declareslessas a peer dependency. Making it explicit ensures builds succeed regardless of npm version.Original prompt
This section details on the original issue you should resolve
<issue_title>npm run build Error: Cannot find module 'less'</issue_title>
<issue_description>I get this error when following manual installation step number 4 on the installation.md
how to resolve this?
build /home/ubuntu/Documents/workspace/blogapp
webpack --progress
Hash: bd9fe2a3bf19a54dc2e6a72c2b580a7f358eb305
Version: webpack 4.46.0
Child
Hash: bd9fe2a3bf19a54dc2e6
Time: 769ms
Built at: 09/05/2022 13:34:16
Asset Size Chunks Chunk Names
app.js 3.89 KiB app [emitted] app
app.js.map 3.65 KiB app [emitted] [dev] app
style.js 10.4 KiB style [emitted] style
style.js.map 3.54 KiB style [emitted] [dev] style
Entrypoint app = app.js app.js.map
Entrypoint style = style.js style.js.map
[./frontend/web/css/style.less] 6.56 KiB {style} [built] [failed] [1 error]
[./frontend/web/js/app.js] 71 bytes {app} [built]
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.