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

JavaScript Error Call to 'require' failed [vercel] #145

Closed
askylift opened this issue Sep 21, 2024 · 2 comments
Closed

JavaScript Error Call to 'require' failed [vercel] #145

askylift opened this issue Sep 21, 2024 · 2 comments

Comments

@askylift
Copy link

[JSE] 
☕  JavaScript Error  Call to 'require' failed:
> main()
  at <module> (/vercel/path0/manage.py:25)
> execute_from_command_line(sys.argv)
  at main (/vercel/path0/manage.py:21)
> utility.execute()
  at execute_from_command_line (/python312/lib/python3.12/site-packages/django/core/management/__init__.py:442)
> self.fetch_command(subcommand).run_from_argv(self.argv)
  at execute (/python312/lib/python3.12/site-packages/django/core/management/__init__.py:436)
> self.execute(*args, **cmd_options)
  at run_from_argv (/python312/lib/python3.12/site-packages/django/core/management/base.py:413)
> output = self.handle(*args, **options)
  at execute (/python312/lib/python3.12/site-packages/django/core/management/base.py:459)
> compile_tailwind(layout)
  at handle (/python312/lib/python3.12/site-packages/picomet/management/commands/build.py:35)
> css, fname, compiled = require("./tailwind.js").compile(
  at compile_tailwind (/python312/lib/python3.12/site-packages/picomet/parser.py:838)
> 

... across the bridge ...
  at cjsLoader (node:internal/modules/esm/translators:346:17)
  at Module._load (node:internal/modules/cjs/loader:1104:12)
  at Module.load (node:internal/modules/cjs/loader:1288:32)
  at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
  at Module._compile (node:internal/modules/cjs/loader:1469:14)
  at Object.<anonymous> (/python312/lib/python3.12/site-packages/picomet/tailwind.js:3:17)
> const postcss = require("postcss");
🌉 Error: Cannot find module 'postcss'
Error: Command "./build.sh" exited with 1
@askylift askylift changed the title JavaScript Error Call to 'require' failed JavaScript Error Call to 'require' failed [vercel] Sep 21, 2024
@askylift
Copy link
Author

It's not working on vercel because the virtualenv is not inside the project folder.

@askylift
Copy link
Author

Setting the NODE_PATH worked

export NODE_PATH=$(pwd)/node_modules

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