linaria
linaria copied to clipboard
_interopRequireDefault is not a function
- Linaria version: 3.0.0-beta.1~17
- Bundler (+ version): webpack4.46.0
- Node.js version: 13
- OS: win7
Description
Module build failed (from ./node_modules/[email protected]@linaria/lib/webpack4-loader.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) TypeError: D:\DEV\git\repo_eb\pcng-client-taro-repo\pcng-client-taro\pcng-client-taro\src\componen
t\MessageAlert.tsx: _interopRequireDefault is not a function
at D:\DEV\git\repo_eb\pcng-client-taro-repo\pcng-client-taro\pcng-client-taro\[email protected]@webpack\lib\NormalModule.js:313:13
at D:\DEV\git\repo_eb\pcng-client-taro-repo\pcng-client-taro\pcng-client-taro\[email protected]@loader-runner\lib\LoaderRunner.js:367:11
at D:\DEV\git\repo_eb\pcng-client-taro-repo\pcng-client-taro\pcng-client-taro\[email protected]@loader-runner\lib\LoaderRunner.js:233:18
at runSyncOrAsync (D:\DEV\git\repo_eb\pcng-client-taro-repo\pcng-client-taro\pcng-client-taro\[email protected]@loader-runner\lib\LoaderRunner.js:14
3:3)
at iterateNormalLoaders (D:\DEV\git\repo_eb\pcng-client-taro-repo\pcng-client-taro\pcng-client-taro\[email protected]@loader-runner\lib\LoaderRunner
.js:232:2)
at Array.
import pxNormalize from "./pxNormalize";
width: ${pxNormalize(200)}px;
var _pxNormalize = _interopRequireDefault(require("./pxNormalize"));
TypeError: _interopRequireDefault is not a function It may happen when your code or third party module is invalid or uses identifiers not available in Node environment, eg. window. Note that line numbers in above stack trace will most likely not match, because Linaria needed to transform your code a bit.
fix: linaria3
The issue does not have reproducible case on Stackblitz or Github and will be closed.
v5 has been released recently and fixes a lot of bugs, please bump to it and report a new issue if the problem still exists.