question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include bolt / typescript dependencies in package.json, remove dependencies on global binaries

See original GitHub issue
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue: As someone who is trying to contribute to this project, I would find it a lot easier to do so if the external dependencies were made internal and specified in package.json. bolt and tsc are the main ones. Using whatever binaries exist on a contributor’s machine will frequently result in frustration (I’m using a version of tsc which spits out a ton of errors on bolt build).

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

⚡️   bolt v0.22.4 (node v10.8.0)
$ yarn build:quick
⚡️   bolt v0.22.4 (node v10.8.0)
$ rimraf dist && bolt ws exec -- rimraf dist
⚡️   bolt v0.22.4 (node v10.8.0)
🏁   Done in 1.14s.
🏁   Done in 2s.
(node:94536) UnhandledPromiseRejectionWarning: Error: ENOTDIR: not a directory, scandir '/Users/xxx/src/electron-forge/packages/.DS_Store'
(node:94536) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:94536) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
packages/api/cli/src/util/check-system.ts:58:21 - error TS2339: Property 'yarnOrNpmSpawn' does not exist on type 'ForgeUtils'.

58   return forgeUtils.yarnOrNpmSpawn(['--version'])
                       ~~~~~~~~~~~~~~

packages/api/cli/src/util/check-system.ts:59:12 - error TS7006: Parameter 'version' implicitly has an 'any' type.

59     .then((version) => {
              ~~~~~~~

packages/api/cli/src/util/check-system.ts:61:22 - error TS2339: Property 'hasYarn' does not exist on type 'ForgeUtils'.

61       if (forgeUtils.hasYarn()) {
                        ~~~~~~~

packages/api/core/src/api/init-scripts/init-custom.ts:11:10 - error TS2305: Module '"/Users/xxx/src/electron-forge/packages/api/cli/node_modules/@electron-forge/shared-types/index"' has no exported member 'ForgeTemplate'.

11 import { ForgeTemplate } from '@electron-forge/shared-types';
            ~~~~~~~~~~~~~

packages/plugin/webpack/src/WebpackPlugin.ts:4:18 - error TS2305: Module '"/Users/xxx/src/electron-forge/packages/plugin/webpack/node_modules/@electron-forge/web-multi-logger/dist/Logger"' has no exported member 'Tab'.

4 import Logger, { Tab } from '@electron-forge/web-multi-logger';
                   ~~~

packages/publisher/github/src/PublisherGithub.ts:51:11 - error TS2322: Type 'ReposGetReleasesResponseItem | undefined' is not assignable to type 'GitHubRelease'.
  Type 'undefined' is not assignable to type 'GitHubRelease'.

51           release = (await github.getGitHub().repos.getReleases({
             ~~~~~~~

packages/publisher/github/src/PublisherGithub.ts:101:15 - error TS2345: Argument of type '{ url: string; file: ReadStream; contentType: string; contentLength: number; name: string; }' is not assignable to parameter of type 'ReposUploadAssetParams'.
  Object literal may only specify known properties, but 'contentType' does not exist in type 'ReposUploadAssetParams'. Did you mean to write 'Content-Type'?

101               contentType: mime.lookup(artifactPath) || 'application/octet-stream',
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What command line arguments are you passing?

bolt build

I am using tsc@3.1.6.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
maleptcommented, Nov 16, 2018

The short version on how to get a development version of Electron Forge up and running with the v6 codebase, as far as I know:

npm install -g bolt
git clone https://github.com/electron-userland/electron-forge
cd electron-forge
bolt # to install dependencies
bolt build

I verified with another environment that typescript/tsc is not required to be installed globally in order for compilation (bolt build) to work.

0reactions
MarshallOfSoundcommented, Nov 17, 2018

@malept Has got the build instruction correct, I’ve added them to the README 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uninstalling packages and dependencies - npm Docs
To remove a package from your node_modules directory, on the command line, use the uninstall command. Include the scope if the package is...
Read more >
How do you uninstall all dependencies listed in package.json ...
In the case of globally-installed packages, switch into your %appdata%/npm folder (if on Windows) and run the same command. EDIT: This command breaks...
Read more >
11 Great Tools for a Monorepo in 2021 | Bits and Pieces
Best tools to build a monorepo. Develop, build, and publish packages, and scale development. Discover Lerna, Nx, Rush, Bit, Yarn Workspaces, and more....
Read more >
Understanding dependencies inside your Package.json
The dependencies in your project's package.json allow the project to install the versions of the modules it depends on. By running an install ......
Read more >
CoffeeScript
Major new features in CoffeeScript 2 include async functions and JSX. ... that the version of CoffeeScript is tracked as one of your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found