{"id":19238521,"url":"https://github.com/tmpfs/spack-optional-dependency-mvp","last_synced_at":"2025-06-25T14:34:30.678Z","repository":{"id":66127934,"uuid":"382200631","full_name":"tmpfs/spack-optional-dependency-mvp","owner":"tmpfs","description":"Spack bundler error with commonjs optional dependency (Linux)","archived":false,"fork":false,"pushed_at":"2021-07-02T01:43:20.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-05T02:12:15.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmpfs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-02T01:43:01.000Z","updated_at":"2021-07-02T01:43:23.000Z","dependencies_parsed_at":"2023-03-10T15:15:31.563Z","dependency_job_id":null,"html_url":"https://github.com/tmpfs/spack-optional-dependency-mvp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpfs%2Fspack-optional-dependency-mvp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpfs%2Fspack-optional-dependency-mvp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpfs%2Fspack-optional-dependency-mvp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpfs%2Fspack-optional-dependency-mvp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmpfs","download_url":"https://codeload.github.com/tmpfs/spack-optional-dependency-mvp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240324059,"owners_count":19783453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T16:33:09.104Z","updated_at":"2025-02-23T13:52:50.175Z","avatar_url":"https://github.com/tmpfs.png","language":"JavaScript","readme":"# CommonJS Optional Dependency\n\nThis repository reproduces an issue with attempting to dynamically `require()` an optional dependency that cannot be installed on Linux.\n\nTo test this you must be running a Linux distro so that the `fsevents` module fails to install.\n\nThen run `npx spack` and `spack` yields this error:\n\n```\n(node:13558) UnhandledPromiseRejectionWarning: Error: load_transformed failed\n\nCaused by:\n    0: failed to analyze module\n    1: failed to resolve fsevents from node_modules/chokidar/lib/fsevents-handler.js\n    2: not found\n(Use `node --trace-warnings ...` to show where the warning was created)\n(node:13558) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)\n(node:13558) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.\n```\n\n---\n\nThe [code that generates this problem](https://github.com/paulmillr/chokidar/blob/master/lib/fsevents-handler.js#L7-L12) is:\n\n```javascript\nlet fsevents;\ntry {\n  fsevents = require('fsevents');\n} catch (error) {\n  if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);\n}\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmpfs%2Fspack-optional-dependency-mvp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmpfs%2Fspack-optional-dependency-mvp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmpfs%2Fspack-optional-dependency-mvp/lists"}