can't find module 'less'
See original GitHub issuewhen I choose the option ‘markdown to pdf’, the error occurs like this:
Failed to activate the markdown-pdf package Cannot find module ‘less’
Error: Cannot find module 'less'
at Module._resolveFilename (module.js:470:15)
at Module._resolveFilename (/opt/atom/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (/opt/atom/resources/app/src/module-cache.js:354:58)
at Module.require (file:///opt/atom/resources/app.asar/static/index.js:40:43)
at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33)
at loadDeps (/home/holyshine/.atom/packages/travs-markdown-pdf-a4918aa/lib/markdown-pdf.js:14:10)
at Object.activate (/home/holyshine/.atom/packages/travs-markdown-pdf-a4918aa/lib/markdown-pdf.js:50:5)
at Package.module.exports.Package.activateNow (/opt/atom/resources/app/src/package.js:253:25)
at /opt/atom/resources/app/src/package.js:984:31
at Function.module.exports.Emitter.simpleDispatch (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
at CommandRegistry.handleCommandEvent (/opt/atom/resources/app/src/command-registry.js:353:24)
at CommandRegistry.dispatch (/opt/atom/resources/app/src/command-registry.js:266:23)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/opt/atom/resources/app/src/atom-environment.js:1382:34)
at EventEmitter.outerCallback (/opt/atom/resources/app/src/application-delegate.js:335:31)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)`
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
webpack error in Cannot find module 'less' - Stack Overflow
This error happens because npm@3 does not resolve peerDependencies any more. npm install less less-loader is the way to go.
Read more >"Error in Cannot find module 'less'" when missing loaders ...
This error happens because npm@3 does not resolve peerDependencies anymore. npm install less less-loader is the way to go. Such an elegant fix....
Read more >less-loader - npm
less -loader applies a Less plugin that passes all queries to the webpack resolver if less could not resolve @import . Thus you...
Read more >Error: Cannot find module 'less' - WayneLiu123 - 博客园
Error : Cannot find module 'less' ... 编辑推荐: · 应届毕业生程序员在面试时如何做好自我介绍? ... · [深度思考]如何优雅的校验参数? ... 阅读排行: · ...
Read more >cannot find module "less" - 掘金
cannot find module "less" · 1. 查找原因. 1. 首先查看了本地的全局安装依赖,未安装less。 · 2. 定位原因. 通过上面的分析可知,最可能的原因是less- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ChaosVan Going out on a limb here, but might it be that these dependencies aren’t downloading due to firewalls? Try the solutions mentioned here and here and let me know if either of them work.
As a last resort, you could try going to the package in the atom config dir (mine is
~/.atom/packages/markdown-pdf
and runnpm i
from there.@jantonioavalos @qiyexue777 @Holy-Shine try installing that module =)
npm install -g less