truffle init 을 하면 다음과 같이 생성되야하는데

 - contracts

 - migrations

 - test

 

 - truffle-config.js

 - truffle.js

 

이중 truffle.js 가 생성되지 않았다.

 

이전 truffle 버전에서는 운영체제에 따라 truffle.js, truffle-config.js 로 구분되어 있었는데

최근 트러플 버전에서는 truffle-config.js 하나로 통일되었다.

 

결국, 그냥 버전이 다른 문제!

 

error

ESLint: Expected property shorthand.(object-shorthand)

 

 

object-shorthand

명령 행  --fix 옵션은 이 규칙에 의해보고 된 일부 문제를 자동으로 수정할 수 있습니다.

개체 리터럴에 대한 메서드 및 속성 단축 구문이 필요하거나 허용하지 않습니다.

ECMAScript 6은 객체 리터럴 메소드 및 속성을 정의하기위한 간결한 양식을 제공합니다. 이 구문을 사용하면 복잡한 객체 리터럴을 훨씬 깔끔하게 정의 할 수 있습니다.

다음은 ES5 구문을 사용하는 몇 가지 일반적인 예입니다.

// properties
var foo = {
    x: x,
    y: y,
    z: z,
};

// methods
var foo = {
    a: function() {},
    b: function() {}
};

링크

'Front-end dev > Error' 카테고리의 다른 글

error) Cannot resolve anchor #goAnchor  (1834) 2023.02.01
error) Trackpad gestures (Mac os)  (1463) 2023.01.06

# error) is defined but never used



jsx로 처리되는 변수들은 shadowing 돼서 eslint가 찾아내지 못한다.

그래서 다음과 같은 에러가 발생하기도 한다.


error 'todo' is defined but never used no-unused-vars



Failed to compile.

./src/App.vue
Module Error (from ./node_modules/eslint-loader/index.js):

D:\vue\todo-project\src\App.vue
  33:21  error  'todo' is defined but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)



이럴 경우 간단하게 에러가 나는 줄 옆에 아래 주석을 달아서 해결할 수 있다.

 // eslint-disable-line no-unused-vars



+ Recent posts