반응형
[Next.js] Module parse failed: Shorthand property assignments are valid
only in destructuring patterns 에러
[js] SyntaxError: Invalid shorthand property initializer 에러
아래와 같이 객체 안에서 c = 3으로 선언하였을 경우의 코드가 존재하였을 경우
x = {
a:1,
b:2,
c=3
}
console.log(x)
[Next.js]에서의 에러창
./src/main.tsx
Module parse failed: Shorthand property assignments are valid only in destructuring patterns (62:34)
File was processed with these loaders:
* ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
You may need an additional loader to handle the result of these loaders.
| a: 1,
| b: 2,
> c= 3
| };
| }
Module parse failed: Shorthand property assignments are valid only in destructuring patterns 에러가 발생한다.
[js]에서의 에러창
./src/index.js:4
c=3
^^^^
SyntaxError: Invalid shorthand property initializer
SyntaxError: Invalid shorthand property initializer 에러가 발생한다.
반응형
'개발 프레임워크 > Next.js' 카테고리의 다른 글
[Next.js, Nextra] Error: Invalid src prop "(domains)" on `next/image` (0) | 2023.07.30 |
---|---|
[Next.js] 컴포넌트에 props로 useState값 넘기기 (0) | 2023.05.15 |
[Next.js] undefined, null strict모드 해제 (0) | 2023.04.14 |
[Nextjs] client의 IP주소를 가져와 비교하여 특정 IP주소에서만 홈페이지 이용을 허용 (0) | 2023.04.03 |
[js] 유한수인지 판별하는 isFinite() 메소드 (0) | 2023.03.30 |
댓글