open-vsx / publish-extensions

Scripts for publishing VS Code extensions to open-vsx.org
Eclipse Public License 2.0
237 stars 201 forks source link

[zhuangtongfa.material-theme] Cannot find module './editorTheme/oneDarkPro' #12

Closed jankeromnes closed 4 years ago

jankeromnes commented 4 years ago
Running: npm install
🚀  Created namespace zhuangtongfa
Executing prepublish script 'npm run vscode:prepublish'...
[FAIL] Could not process extension: {
  "id": "zhuangtongfa.material-theme",
  "version": "3.2.4",
  "repository": "https://github.com/Binaryify/OneDark-Pro"
}
Error: Command failed: npm run vscode:prepublish
warning material-theme@3.2.4: The engine "vscode" appears to be invalid.
warning material-theme@3.2.4: The engine "vscode" appears to be invalid.

/tmp/repository/node_modules/ts-node/src/index.ts:421
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
##[error]src/themes/editor.ts(7,24): error TS2307: Cannot find module './editorTheme/oneDarkPro'.

    at createTSError (/tmp/repository/node_modules/ts-node/src/index.ts:421:12)
    at reportTSError (/tmp/repository/node_modules/ts-node/src/index.ts:425:19)
    at getOutput (/tmp/repository/node_modules/ts-node/src/index.ts:557:36)
    at Object.compile (/tmp/repository/node_modules/ts-node/src/index.ts:762:32)
    at Module.m._compile (/tmp/repository/node_modules/ts-node/src/index.ts:841:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Object.require.extensions.<computed> [as .ts] (/tmp/repository/node_modules/ts-node/src/index.ts:844:12)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
error Command failed with exit code 1.
error Command failed with exit code 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! material-theme@3.2.4 vscode:prepublish: `yarn compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the material-theme@3.2.4 vscode:prepublish 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!     /home/runner/.npm/_logs/2020-03-20T11_11_32_460Z-debug.log

    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:311:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'npm run vscode:prepublish'
}
##[error]Process completed with exit code 255.
jankeromnes commented 4 years ago

So first of all, the first line shouldn't be npm install but yarn install, because https://github.com/Binaryify/OneDark-Pro has a yarn.lock file.

jankeromnes commented 4 years ago

But when I follow these steps:

  1. https://gitpod.io/#https://github.com/Binaryify/OneDark-Pro
  2. Run yarn
  3. Set a suitable OVSX_PAT
  4. Run npx ovsx publish --yarn

I still get the same error:

gitpod /workspace/OneDark-Pro $ npx ovsx publish --yarn
npx: installed 67 in 3.581s
Executing prepublish script 'yarn run vscode:prepublish'...
❌  Command failed: yarn run vscode:prepublish
warning material-theme@3.2.4: The engine "vscode" appears to be invalid.
warning material-theme@3.2.4: The engine "vscode" appears to be invalid.
warning material-theme@3.2.4: The engine "vscode" appears to be invalid.

/workspace/OneDark-Pro/node_modules/ts-node/src/index.ts:421
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
src/themes/editor.ts(7,24): error TS2307: Cannot find module './editorTheme/oneDarkPro'.

    at createTSError (/workspace/OneDark-Pro/node_modules/ts-node/src/index.ts:421:12)
    at reportTSError (/workspace/OneDark-Pro/node_modules/ts-node/src/index.ts:425:19)
    at getOutput (/workspace/OneDark-Pro/node_modules/ts-node/src/index.ts:530:36)
    at Object.compile (/workspace/OneDark-Pro/node_modules/ts-node/src/index.ts:735:32)
    at Module.m._compile (/workspace/OneDark-Pro/node_modules/ts-node/src/index.ts:814:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/workspace/OneDark-Pro/node_modules/ts-node/src/index.ts:817:12)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
error Command failed with exit code 1.
error Command failed with exit code 1.
error Command failed with exit code 1.
jankeromnes commented 4 years ago

Fixed: https://open-vsx.org/extension/zhuangtongfa/material-theme