vscode-factorio-lua-api-autocomplete
vscode-factorio-lua-api-autocomplete copied to clipboard
Issues setting up dev env and running scraper
Hi I was interested in using this extension to write a factorio mod. I noticed the definitions were out of date and wanted update them.
I have attempted this on both windows, windows wsl, and mac os x.
I cloned the repository, selected the correct node version using nvm use
and then ran into some issues during npm install
Here is log from my terminal
Zacks-MBP:vscode-factorio-lua-api-autocomplete zack$ npm install
> [email protected] install /Users/zack/projects/vscode-factorio-lua-api-autocomplete/node_modules/libxmljs
> node-pre-gyp install --fallback-to-build --loglevel http
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp http GET https://github.com/libxmljs/libxmljs/releases/download/v0.19.5/node-v57-darwin-x64.tar.gz
node-pre-gyp http 200 https://github.com/libxmljs/libxmljs/releases/download/v0.19.5/node-v57-darwin-x64.tar.gz
[libxmljs] Success: "/Users/zack/projects/vscode-factorio-lua-api-autocomplete/node_modules/libxmljs/build/Release/xmljs.node" is installed via remote
> [email protected] postinstall /Users/zack/projects/vscode-factorio-lua-api-autocomplete
> node ./node_modules/vscode/bin/install
Detected VS Code engine version: ^1.20.0
Error installing vscode.d.ts: Error: Request returned status code: 404
Details: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/releases/stable</pre>
</body>
</html>
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node ./node_modules/vscode/bin/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zack/.npm/_logs/2021-04-19T00_38_16_407Z-debug.log
Without resolving this error, trying to run the scraper hits a typescript error
Zacks-MBP:vscode-factorio-lua-api-autocomplete zack$ npx ts-node scraper/index.ts
⨯ Unable to compile TypeScript:
scraper/classes.ts:15:18 - error TS2304: Cannot find name 'FactorioTypeMap'.
15 let classes: FactorioTypeMap = {}
~~~~~~~~~~~~~~~
scraper/classes.ts:127:55 - error TS2304: Cannot find name 'FactorioType'.
127 _.forEach(type.properties, (prop: FactorioType) => {
~~~~~~~~~~~~
I would appreciate any guidance to getting this issues resolved so I can update the definitions and potentially improve the extension in other ways. Thanks.
Addressed in https://github.com/simonvizzini/vscode-factorio-lua-api-autocomplete/pull/13