Skip to content

Fix bug: TS5023: Unknown compiler option '...' #167

Description

@yzf12346

Problem

~/xxx $ serein build
[18:00:59] Using gulpfile ~/xxx/gulpfile.js
[18:00:59] Starting 'build'...
[18:00:59] Starting '<anonymous>'...
[18:00:59] Finished '<anonymous>' after 40 ms
[18:00:59] Starting 'copy_behavior_packs'...
[18:00:59] Starting 'copy_resource_packs'...
[18:00:59] Finished 'copy_behavior_packs' after 69 ms
[18:00:59] Finished 'copy_resource_packs' after 90 ms
[18:00:59] Starting 'compile_scripts'...
error TS5023: Unknown compiler option 'compilerOptions'.
error TS5023: Unknown compiler option 'include'.
error TS5023: Unknown compiler option 'compileOnSave'.
(node:25077) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
[18:01:01] Finished 'compile_scripts' after 2.54 s
[18:01:01] Starting 'esbuild_system'...
[18:01:02] Finished 'esbuild_system' after 115 ms
[18:01:02] Starting '<anonymous>'...
[18:01:02] Finished '<anonymous>' after 7.87 ms
[18:01:02] Finished 'build' after 2.81 s

This is source file /project/scripts/main.ts

import {world} from "@minecraft/server"

console.log("Hello minecraft!")

This is output file /project/build/behavior_packs/scripts/main.js

// build/scripts/main.js
Object.defineProperty(exports, "__esModule", { value: true });
console.log("Hello minecraft!");
//# sourceMappingURL=main.js.map

Untested solutions(fixed in my device):

Modify the line 81(function compile_scripts) of gulpfile.js

function compile_scripts() {
  return gulp
                .src(resolve(scriptsPath, '**/*.ts'))
                // .pipe(ts(tsconfig))
                .pipe(ts(tsconfig["compilerOptions"]))
                .pipe(gulp.dest(resolve(output, 'scripts')))
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions