Неперехваченная ошибка: не удается найти модуль './_baseGetTag' (электронный loda sh) - PullRequest
0 голосов
/ 05 мая 2020
• 1000 относящейся к строке в isFunction loda sh.

Я перенес весь свой код, и ни один из node_modules, и мое приложение не работает с npm start только не после сборки, поэтому я предполагаю, что я неправильно упаковал что-то, но я не уверен что.

Мой код упаковщика выглядит так:

    return packager({
        dir: pathInfo.src,                                        //Includes all code and node_modules neccesary
         ignore: "^/node_modules/*",
        out: pathInfo.dir,
        icon: path.join(pathInfo.assets, "TestApp.ico"),
        download: {                                               //Forcing use manual cache
            cacheRoot: path.join(pathInfo.dir, "cache"),
            mirrorOptions: {
                mirror: ".",
                customDir: ".",
                customFilename: "."
            }
        },
        noDownload: {
            force: true
        },
        electronVersion: "2.0.9",
        platform: "win32",
        arch: "x64"
    }).then(() => {
        return gulp.src([path.join(pathInfo.src, "node_modules/**/*")])
            .pipe(gulp.dest(path.join(pathInfo.dir, "TestApp-win32-x64/resources/app/node_modules")));  //Moving node modules
    }).catch((ex) => {
        console.log("packager failed\n");
        console.log(ex);
    });
...