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

npm run build - Error: ENOENT: no such file or directory, open 'bytebuffer.js/src/ByteBuffer.js' in meta program of 'bytebuffer.js/src/wrap-node.js': #93

Open
courteous opened this issue May 26, 2018 · 0 comments

Comments

@courteous
Copy link

Hello Daniel,

i am trying to build the ByteBuffer however i am having trouble running

npm run build

the script complains about the ByteBuffer.js missing in the src/wrap-node.js file

before trying to run the npm run build i. did

npm install --only=dev
and then

npm install long which did installed + [email protected]

as far as i understand this is the only real dependency for the Byte Buffer.

May I ask, do you have any idea what what this error means:


> [email protected] build /home/tito/Projects/ByteBufferJS/bytebuffer.js
> node scripts/build.js

Building bytebuffer-node with scope {
  "VERSION": "5.0.1",
........

  "ISTRING": true,
  "ALIASES": true,
  "INLINE": true,
  "VERBOSE_MS": false,
  "NODE": true
}
/home/tito/Projects/ByteBufferJS/bytebuffer.js/node_modules/metascript/MetaScript.js:394
                throw(err);
                ^

Error: ENOENT: no such file or directory, open '/home/tito/Projects/ByteBufferJS/bytebuffer.js/src/ByteBuffer.js' in meta program of '/home/tito/Projects/ByteBufferJS/bytebuffer.js/src/wrap-node.js':
        VERSION = "5.0.1";
        ENCODINGS = true;
        BASE64 = true;
        BINARY = true;
        DEBUG = true;
        HEX = true;
        UTF8 = true;
      .......
          write('        memcpy = null; try { memcpy = require("memcpy"); } catch (e) {}\n');
          write('\n');
        __='    ';
    --> include("ByteBuffer.js");
          write('\n');
          write('    /**\n');
          write('     * node-memcpy. This is an optional binding dependency and may not be present.\n');
          write('     * @function\n');
          write('     * @param {!(Buffer|ArrayBuffer|Uint8Array)} target Destination\n');
          write('     * @param {number|!(Buffer|ArrayBuffer)} targetStart Destination start, defaults to 0.\n');
          write('     * @param {(!(Buffer|ArrayBuffer|Uint8Array)|number)=} source Source\n');
          write('     * @param {number=} sourceStart Source start, defaults to 0.\n');
          write('     * @param {number=} sourceEnd Source end, defaults to capacity.\n');
          write('     * @returns {number} Number of bytes copied\n');
          write('     * @throws {Error} If any index is out of bounds\n');
          write('     * @expose\n');
          write('     */\n');
          write('    ByteBuffer.memcpy = memcpy;\n');
          write('\n');
          write('    return ByteBuffer;\n');
          write('\n');
          write('})();\n');

    at __runProgram (/home/tito/Projects/ByteBufferJS/bytebuffer.js/node_modules/metascript/MetaScript.js:392:23)
    at MetaScript.module.exports.MetaScript.transform (/home/tito/Projects/ByteBufferJS/bytebuffer.js/node_modules/metascript/MetaScript.js:433:9)
    at evalmachine.<anonymous>:1:49
    at Script.runInContext (vm.js:74:29)
    at Script.runInNewContext (vm.js:80:15)
    at Object.runInNewContext (vm.js:195:38)
    at Function.module.exports.MetaScript.transform (/home/tito/Projects/ByteBufferJS/bytebuffer.js/node_modules/metascript/MetaScript.js:226:12)
    at Object.<anonymous> (/home/tito/Projects/ByteBufferJS/bytebuffer.js/scripts/build.js:83:16)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)

> [email protected] build /home/tito/Projects/ByteBufferJS/bytebuffer.js
> node scripts/build.js

Building bytebuffer-node with scope {
  "VERSION": "5.0.1",
........

  "ISTRING": true,
  "ALIASES": true,
  "INLINE": true,
  "VERBOSE_MS": false,
  "NODE": true
}
/home/tito/Projects/ByteBufferJS/bytebuffer.js/node_modules/metascript/MetaScript.js:394
                throw(err);
                ^

Error: ENOENT: no such file or directory, open '/home/tito/Projects/ByteBufferJS/bytebuffer.js/src/ByteBuffer.js' in meta program of '/home/tito/Projects/ByteBufferJS/bytebuffer.js/src/wrap-node.js':
        VERSION = "5.0.1";
        ENCODINGS = true;
        BASE64 = true;
        BINARY = true;
        DEBUG = true;
        HEX = true;
        UTF8 = true;
      .......
          write('        memcpy = null; try { memcpy = require("memcpy"); } catch (e) {}\n');
          write('\n');
        __='    ';
    --> include("ByteBuffer.js");
          write('\n');
          write('    /**\n');
          write('     * node-memcpy. This is an optional binding dependency and may not be present.\n');
          write('     * @function\n');
          write('     * @param {!(Buffer|ArrayBuffer|Uint8Array)} target Destination\n');
          write('     * @param {number|!(Buffer|ArrayBuffer)} targetStart Destination start, defaults to 0.\n');
          write('     * @param {(!(Buffer|ArrayBuffer|Uint8Array)|number)=} source Source\n');
          write('     * @param {number=} sourceStart Source start, defaults to 0.\n');
          write('     * @param {number=} sourceEnd Source end, defaults to capacity.\n');
          write('     * @returns {number} Number of bytes copied\n');
          write('     * @throws {Error} If any index is out of bounds\n');
          write('     * @expose\n');
          write('     */\n');
          write('    ByteBuffer.memcpy = memcpy;\n');
          write('\n');
          write('    return ByteBuffer;\n');
          write('\n');
          write('})();\n');

    at __runProgram (/home/tito/Projects/ByteBufferJS/bytebuffer.js/node_modules/metascript/MetaScript.js:392:23)
    at MetaScript.module.exports.MetaScript.transform (/home/tito/Projects/ByteBufferJS/bytebuffer.js/node_modules/metascript/MetaScript.js:433:9)
    at evalmachine.<anonymous>:1:49
    at Script.runInContext (vm.js:74:29)
    at Script.runInNewContext (vm.js:80:15)
    at Object.runInNewContext (vm.js:195:38)
    at Function.module.exports.MetaScript.transform (/home/tito/Projects/ByteBufferJS/bytebuffer.js/node_modules/metascript/MetaScript.js:226:12)
    at Object.<anonymous> (/home/tito/Projects/ByteBufferJS/bytebuffer.js/scripts/build.js:83:16)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
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