错误:找不到模块“ package.json” nexe

时间:2018-06-28 13:07:01

标签: javascript node.js

nexe -i ./index.js -o Thumbnailer.bin -p /usr/bin/python2 --build 使用nexe并尝试运行我的Binary后,我收到以下错误消息:

╰─$ ./Thumbnailer.bin
        internal/modules/cjs/loader.js:596
        throw err;
    ^

Error: Cannot find module 'package.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at f (/home/lwolf/Projekte/Thumbnailer/Thumbnailer.bin:33356:1092)
    at u (/home/lwolf/Projekte/Thumbnailer/Thumbnailer.bin:33356:1430)
    at c (/home/lwolf/Projekte/Thumbnailer/Thumbnailer.bin:33356:2750)
    at b.require (/home/lwolf/Projekte/Thumbnailer/Thumbnailer.bin:33356:3346)
    at Object.<anonymous> (/home/lwolf/Projekte/Thumbnailer/Thumbnailer.bin:8401:26)
    at c (/home/lwolf/Projekte/Thumbnailer/Thumbnailer.bin:33356:3584)

在index.js中,我只需要: const puppeteer = require('puppeteer');

  • 平台(操作系统/版本):Manajro 17
  • 主机节点版本:10.4
  • 目标节点版本:10.4
  • Nexe版本:2.0.0-rc.30
  • Python版本:2

0 个答案:

没有答案