//해결:결국 자동으로 import,export해주는 extension을 VSC에 추가했다.
//해결:아래의 문구를 index파일에 추가하면 모든 요소들이 불러와짐.
import * as All from './layout';
3. 선언안하고 태그지정하면 아래의 오류메세지를 볼것.
ReferenceError: Main is not defined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Server Error
ReferenceError: document is not defined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
“0000”으로했더니 괜찮아졌다.
ModuleBuildError
:
Module build failed (from ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js):
Error: error: Legacy octal escape is not permitted in strict mode
./pages/quiz/02-state-quiz/number.js
Error: error: Legacy octal escape is not permitted in strict mode
|
4 | const [number,setNumber] = useState(000000);
| ^^^^^^
Caused by:
0: failed to process js file
1: error was recoverable, but proceeding would result in wrong codegen
2: Syntax Error
10.가끔 알수 없는 오류로 코드에 문제가 없어보이는데도 페이지에 오류가 뜰때가 있는데, 오류메세지에 모듈어쩌고가 있다면 대부분 버전문제이거나, 필요한 기능을 install하지 않아서이다. 그럴 시에 해당폴더에 있는 package.json파일로 가서 필요한 모듈과 버전을 수정해주도록 하자. 그후 터미널에서 install하면 정상적으로 작동된다.
chencked={}
이 속성안에 맞지 않는 무언가를 부여한게 문제인거같은데 mdn을 살짝보고 오니 checked는 dom이 아니라 css관련 속성이었던 모양이다.react-dom.development.js?61bb:67 Warning: You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.