Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[!] (plugin typescript) Error: Could not load ...\excludeTitle.json: Debug Failure. #1789

Unanswered
dimaslanjaka asked this question in Q&A
Discussion options

How to fix [!] (plugin typescript) Error: Could not load D:\Repositories\static-blog-generator\packages\sbg-cli\src\import\blogger\excludeTitle.json: Debug Failure.

here my rollup.config.js

import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import fs from 'fs-extra';
import * as glob from 'glob';
import url from 'node:url';
import path from 'path';
import { external, tsconfig } from './rollup.utils.js';
const __filename = url.fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
/**
 * @type {import('./package.json')}
 */
const { author, version, name } = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf-8'));
const year = new Date().getFullYear();
const banner = `// ${name} v${version} Copyright (c) ${year} ${author}`;
/**
 * @type {import('rollup').RollupOptions['input']}
 */
const inputs = glob.globSync('src/**/*.{ts,js,cjs,mjs,json}', {
 posix: true,
 ignore: tsconfig.exclude.concat('*.runner.*', '*.explicit.*', '*.test.*', '*.builder.*', '*.spec.*')
});
const plugins = [
 json(),
 typescript({
 tsconfig: false,
 compilerOptions: tsconfig.compilerOptions,
 include: ['./src/**/*'],
 exclude: tsconfig.exclude,
 resolveJsonModule: true,
 resolvePackageJsonImports: true,
 resolvePackageJsonExports: true
 }), // Compile TypeScript files
 resolve({ preferBuiltins: true }),
 commonjs()
];
/**
 * @type {import('rollup').RollupOptions}
 */
const _partials = {
 input: inputs,
 output: [
 {
 dir: 'dist',
 format: 'esm',
 sourcemap: false,
 preserveModules: true,
 exports: 'named',
 globals: {
 hexo: 'hexo'
 },
 banner
 },
 {
 dir: 'dist',
 format: 'cjs',
 sourcemap: false,
 preserveModules: true,
 exports: 'named',
 entryFileNames: '[name].cjs',
 globals: {
 hexo: 'hexo'
 },
 banner
 },
 {
 dir: 'dist',
 format: 'esm',
 sourcemap: false,
 preserveModules: true,
 exports: 'named',
 entryFileNames: '[name].mjs',
 globals: {
 hexo: 'hexo'
 },
 banner
 }
 ],
 plugins,
 external // External dependencies package name to exclude from bundle
};

tsconfig.json

{
 "extends": "@tsconfig/node16/tsconfig.json",
 "ts-node": {
 "esm": true,
 "experimentalSpecifierResolution": "node",
 "compilerOptions": {
 "esModuleInterop": true,
 "allowSyntheticDefaultImports": true
 }
 },
 "compilerOptions": {
 /* Basic Options */
 "target": "ES2020",
 "module": "ESNext",
 "lib": ["ES2019", "ES2020", "DOM", "ES6"],
 "outDir": "./dist",
 "allowJs": true,
 "checkJs": false,
 "resolveJsonModule": true,
 "downlevelIteration": true,
 "noImplicitAny": false,
 /* Strict Type-Checking Options */
 "strict": true,
 /* Module Resolution Options */
 "allowSyntheticDefaultImports": true,
 "moduleResolution": "Bundler",
 "esModuleInterop": true,
 /* Advanced Options */
 "forceConsistentCasingInFileNames": true,
 "skipDefaultLibCheck": true,
 "skipLibCheck": true
 },
 "exclude": ["**/dist/**", "**/node_modules/**", "**/tmp/**"]
}
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /