Я не совсем уверен, в чем проблема, но это происходит на npm start
, шаблон только что скачан, и я запустил npm install
. Та же самая ошибка появляется, когда я пытаюсь воссоздать шаблон самостоятельно. Код не был изменен. ( Ссылка на шаблон )
Я пробовал искать, но не нашел ничего полезного, также попытался удалить node_modules и запустить npm install
Это gulpfile.js
const exec = require('child_process').exec;
const gulp = require('gulp');
const babel = require('gulp-babel');
const css = require('gulp-clean-css');
const livereload = require('gulp-livereload');
gulp.task('copy', () => {
return gulp.src('assets/**/*')
.pipe(gulp.dest('app/assets'));
});
gulp.task('html', () => {
return gulp.src('src/index.html')
.pipe(gulp.dest('app/'))
.pipe(livereload());
});
gulp.task('css', () => {
return gulp.src('src/**/*.css')
.pipe(css())
.pipe(gulp.dest('app/'))
.pipe(livereload());
});
gulp.task('js', () => {
return gulp.src(['main.js', 'src/**/*.js'])
.pipe(babel())
.pipe(gulp.dest('app/'))
.pipe(livereload());
});
gulp.task('watch', async function() {
livereload.listen();
gulp.watch('src/**/*.html', gulp.series('html'));
gulp.watch('src/**/*.css', gulp.series('css'));
gulp.watch('src/**/*.js', gulp.series('js'));
});
gulp.task('build', gulp.series('copy', 'html', 'css', 'js'));
gulp.task('start', gulp.series('build', () => {
return exec(
__dirname+'/node_modules/.bin/electron .'
).on('close', () => process.exit());
}));
gulp.task('default', gulp.parallel('start', 'watch'));
gulp.task('release', gulp.series('build', () => {
return exec(
__dirname+'/node_modules/.bin/electron-builder .'
).on('close', () => process.exit());
}));
Это сообщение об ошибке:
[17:41:13] Using gulpfile somepath\electrate-master\gulpfile.js
[17:41:13] Starting 'default'...
[17:41:13] Starting 'start'...
[17:41:13] Starting 'watch'...
[17:41:13] Starting 'build'...
[17:41:13] Starting 'copy'...
[17:41:13] Finished 'watch' after 40 ms
[17:41:13] Finished 'copy' after 73 ms
[17:41:13] Starting 'html'...
[17:41:13] somepath\electrate-master\app\index.html reloaded.
[17:41:13] Finished 'html' after 19 ms
[17:41:13] Starting 'css'...
[17:41:13] somepath\electrate-master\app\index.css reloaded.
[17:41:13] Finished 'css' after 28 ms
[17:41:13] Starting 'js'...
[17:41:14] somepath\electrate-master\app\main.js reloaded.
[17:41:14] somepath\electrate-master\app\app.js reloaded.
[17:41:14] somepath\electrate-master\app\app.test.js reloaded.
[17:41:14] somepath\electrate-master\app\index.js reloaded.
[17:41:14] Finished 'js' after 872 ms
[17:41:14] Finished 'build' after 1.02 s
[17:41:14] Starting '<anonymous>'...
[17:41:14] '<anonymous>' errored after 22 ms
[17:41:14] Error: exited with error code: 1
at ChildProcess.onexit (somepath\electrate-master\node_modules\end-of-stream\index.js:40:36)
at ChildProcess.emit (events.js:189:13)
at ChildProcess.EventEmitter.emit (domain.js:459:23)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
[17:41:14] 'start' errored after 1.05 s
[17:41:14] 'default' errored after 1.05 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electrate@1.0.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electrate@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! someotherpath\AppData\Roaming\npm-cache\_logs\2019-10-17T15_41_14_128Z-debug.log