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

react helloworld-ts cannot run #133

Open
yangg opened this issue May 9, 2024 · 0 comments
Open

react helloworld-ts cannot run #133

yangg opened this issue May 9, 2024 · 0 comments

Comments

@yangg
Copy link

yangg commented May 9, 2024

ERROR in ./src/index.tsx
Module build failed (from ./node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/babel-loader/lib/index.js):
ValidationError: Invalid configuration object. Babel loader has been initialized using a configuration object that does not match the API schema.
 - configuration should be an object:
   object { cacheDirectory?, cacheIdentifier?, cacheCompression?, customize?, … }

tried in yarn and pnpm,

resolved by add options: {} in webpack.config.js

 module: {
    rules: [
      {
        test: /\.(js|jsx|ts|tsx)$/,
        loader: "babel-loader",
        exclude: /node_modules/,
        include: /src/,
        sideEffects: false,
        options: {},
      },
    ],
  },
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

1 participant