laverdet / xxscreeps

Other
71 stars 16 forks source link

Can not build the server #67

Closed HuaTaoFnox closed 7 months ago

HuaTaoFnox commented 7 months ago

I got errors when I tried to run npm run build in M1 Mac. It seems like the type of the param is mismatch.

src/driver/private/transform.ts:171:19 - error TS2345: Argument of type 'Visitor<State>' is not assignable to parameter of type 'TraverseOptions<State>'.
  Type 'Visitor<State>' is not assignable to type '{ StringLiteral?: VisitNode<State, StringLiteral>; BigIntLiteral?: VisitNode<State, BigIntLiteral>; BooleanLiteral?: VisitNode<...>; ... 250 more ...; YieldExpression?: VisitNode<...>; }'.
    Types of property 'RestProperty' are incompatible.
      Type '(VisitNode<State, RestProperty> & VisitNode<State, RestElement>) | undefined' is not assignable to type 'VisitNode<State, RestProperty>'.
        Type 'undefined' is not assignable to type 'VisitNode<State, RestProperty>'.

171     path.traverse(visitor, { program: path, methods: new Map });
                      ~~~~~~~

src/mods/backend/steam/openid.ts:19:35 - error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, options?: any]'.
  Target requires 1 element(s) but source may have fewer.

19   return authenticate.apply(this, args);
                                     ~~~~

src/mods/backend/steam/openid.ts:50:4 - error TS2345: Argument of type '{ apiKey: string; profile: boolean; returnURL: string; }' is not assignable to parameter of type 'SteamStrategyOptions'.
  Object literal may only specify known properties, and 'profile' does not exist in type 'SteamStrategyOptions'.

50    profile: false,
      ~~~~~~~~~~~~~~

Found 3 errors.
HuaTaoFnox commented 7 months ago

It's fixed: I remvoed ~ of "@types/~passport-steam": "1.0.1", in file package.json.

HuaTaoFnox commented 7 months ago

The next npx xxscreeps import passed by changing to node v16.