question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot find module 'node-sass' (ERPNEXT_VERSION=v13.0.0 and FRAPPE_VERSION=v13.0.2)

See original GitHub issue

Description of the issue

Can’t patch and migrate to newest versions

Context information (for bug reports)

Ugrade to newest version for erpnext

Steps to reproduce the issue

  1. Pull new version ERPNEXT_VERSION=v13.0.0 FRAPPE_VERSION=v13.0.2
  2. Recreate docker
  3. Run migrate

Observed result

Error: Cannot find module ‘node-sass’

Expected result

Patched and no error

Stacktrace / full error message if available

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/commands/migrate.py", line 51, in <module>
    main()
  File "/home/frappe/frappe-bench/commands/migrate.py", line 44, in main
    migrate_sites()
  File "/home/frappe/frappe-bench/commands/migrate.py", line 35, in migrate_sites
    migrate()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 89, in migrate
    frappe.get_attr(fn)()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/website_theme/website_theme.py", line 185, in after_migrate
    doc.generate_bootstrap_theme()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/website_theme/website_theme.py", line 80, in generate_bootstrap_theme
    frappe.throw('<div style="font-family: monospace;">{stderr}</div>'.format(stderr=stderr))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 424, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 403, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 357, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: <div style="font-family: monospace;">internal/modules/cjs/loader.js:818<br>  throw err;<br>  ^<br><br>Error: Cannot find module 'node-sass'<br>Require stack:<br>- /home/frappe/frappe-bench/apps/frappe/generate_bootstrap_theme.js<br>    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)<br>    at Function.Module._load (internal/modules/cjs/loader.js:667:27)<br>    at Module.require (internal/modules/cjs/loader.js:887:19)<br>    at require (internal/modules/cjs/helpers.js:74:18)<br>    at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/generate_bootstrap_theme.js:1:14)<br>    at Module._compile (internal/modules/cjs/loader.js:999:30)<br>    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)<br>    at Module.load (internal/modules/cjs/loader.js:863:32)<br>    at Function.Module._load (internal/modules/cjs/loader.js:708:14)<br>    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {<br>  code: 'MODULE_NOT_FOUND',<br>  requireStack: [<br>    '/home/frappe/frappe-bench/apps/frappe/generate_bootstrap_theme.js'<br>  ]<br>}<br></div>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
revantcommented, Apr 11, 2021

you can update on docker compose file

I’ll update the site operations README

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR in Cannot find module 'node-sass' - Stack Overflow
Here's the solution: sudo npm install --save-dev --unsafe-perm node-sass. Enjoy! Edited to explain the options (from comments):.
Read more >
Cannot find module 'node-sass' error | bobbyhadz
To solve the error Cannot find module 'node-sass', make sure to install the `node-sass` package by opening your terminal in your project's root...
Read more >
Cannot find module 'node-sass' #8912 - angular/components
Module build failed: Error: Cannot find module 'node-sass'. I can't figure out what causes this issue. P.S. I installed the latest Angular Material...
Read more >
Cannot find module 'node-sass' on NPM build
I tried running a build 'ng build --prod' locally and didnt encounter any errors. I also tried add a new build step calling....
Read more >
node-sass - npm
It allows you to natively compile .scss files to css at incredible speed and automatically via a connect middleware. Find it on npm:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found