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

Error: Cannot find a specific module on FreeBSD 13.1 #373

Open
Pacifizt opened this issue Oct 11, 2023 · 4 comments
Open

Error: Cannot find a specific module on FreeBSD 13.1 #373

Pacifizt opened this issue Oct 11, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@Pacifizt
Copy link

Pacifizt commented Oct 11, 2023

To Reproduce
Steps to reproduce the behavior:

  1. Run npx hfs@latest

Describe the bug
ERROR

node:internal/modules/cjs/loader:1080
throw err;
^

Error: Cannot find module '/root/node_modules/fs-x-attributes/prebuilds/freebsd-x64.node'
Require stack:

  • /root/node_modules/fs-x-attributes/index.js
  • /root/node_modules/hfs/src/util-files.js
  • /root/node_modules/hfs/src/misc.js
  • /root/node_modules/hfs/src/apiMiddleware.js
  • /root/node_modules/hfs/src/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object. (/root/node_modules/fs-x-attributes/index.js:5:32)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/root/node_modules/fs-x-attributes/index.js',
    '/root/node_modules/hfs/src/util-files.js',
    '/root/node_modules/hfs/src/misc.js',

Environment (please complete the following information):

  • OS: FreeBSD 13.1
  • HFS Version 0.48.2
  • NodeJS v18.18.0
@Pacifizt Pacifizt added the bug Something isn't working label Oct 11, 2023
@rejetto
Copy link
Owner

rejetto commented Oct 11, 2023

so, apparently hfs is not supporting freebsd :(
the reason (or one of reasons) is this "fs-x-attributes", that works with Linux but not freebsd. I'm going to ask the author, but he may even not answer at all.
it's almost impossible for me to make work on this, or even test, as i don't have freebsd.
if you want to help the cause, you can try to run npm i fs-xattr, which is a similar package supporting freebsd, and see if it reports any error.

@rejetto rejetto added enhancement New feature or request and removed bug Something isn't working labels Oct 11, 2023
@Pacifizt
Copy link
Author

root@fs-new:~ # npm i fs-xattr
npm ERR! code 1
npm ERR! path /root/node_modules/fs-xattr
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gmake: Entering directory '/root/node_modules/fs-xattr/build'
npm ERR! CC(target) Release/obj.target/xattr/src/async.o
npm ERR! gmake: Leaving directory '/root/node_modules/fs-xattr/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@18.18.0 | freebsd | x64
npm ERR! gyp info find Python using Python version 3.9.18 found at "/usr/local/bin/python3.9"
npm ERR! gyp info spawn /usr/local/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/node_modules/fs-xattr/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/18.18.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.18.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.18.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/root/node_modules/fs-xattr',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn gmake
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/async.c:4:10: fatal error: 'sys/xattr.h' file not found
npm ERR! #include <sys/xattr.h>
npm ERR! ^~~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! gmake: *** [xattr.target.mk:111: Release/obj.target/xattr/src/async.o]Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: gmake failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12)
npm ERR! gyp ERR! System FreeBSD 13.1-RELEASE-p7
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /root/node_modules/fs-xattr
npm ERR! gyp ERR! node -v v18.18.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-11T18_46_25_814Z-debug-0.log

@Pacifizt
Copy link
Author

Version 0.45 works fine.

@rejetto
Copy link
Owner

rejetto commented Oct 11, 2023

good to know.
Now i take note and i'll see if I can make this "breaking" thing optional, and in case i'll give you an update on this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants