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

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

Open
yzf12346 opened this issue Dec 22, 2024 · 0 comments
Open

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

yzf12346 opened this issue Dec 22, 2024 · 0 comments
Assignees

Comments

@yzf12346
Copy link

yzf12346 commented Dec 22, 2024

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')))
}
@Lampese Lampese self-assigned this Dec 22, 2024
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

2 participants