Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Will not build on Windows 10 64-bit #3581

Closed
JonathanWilbur opened this issue Mar 6, 2021 · 6 comments · Fixed by #3550
Closed

Will not build on Windows 10 64-bit #3581

JonathanWilbur opened this issue Mar 6, 2021 · 6 comments · Fixed by #3550
Labels
kind/support A question or request for support

Comments

@JonathanWilbur
Copy link

  • Version: 0.5.2
  • Platform: Windows 10 64-Bit Pro
  • Subsystem: ipfs-core

Severity: Critical

Description:

I ran npm install ipfs-core to install. It worked, and during development, the types work, but when I compile, I get 67 errors that I will paste in my next comment.

Steps to reproduce the error:

Just install it on Windows 10 64-bit?

@JonathanWilbur JonathanWilbur added the need/triage Needs initial labeling and prioritization label Mar 6, 2021
@welcome
Copy link

welcome bot commented Mar 6, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@JonathanWilbur
Copy link
Author

Errors

node_modules/electron-fetch/index.d.ts:2:25 - error TS2307: Cannot find module 'electron' or its corresponding type declarations.

2 import { Session } from 'electron'
                          ~~~~~~~~~~

node_modules/interface-datastore/src/types.d.ts:1:22 - error TS7016: Could not find a declaration file for module './key'. 'C:/Users/Jonathan/Desktop/wildboar/api2.vis.apps.wildboarsoftware.com/node_modules/interface-datastore/src/key.js' implicitly has an 'any' type.

1 import type Key from './key'
                       ~~~~~~~

node_modules/ipfs-core-utils/dist/src/pins/normalise-input.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/bitswap/stat.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/block/get.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/block/put.d.ts:7:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

7 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/block/rm.d.ts:6:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

6 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/block/stat.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/config.d.ts:23:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

23 export = _exports;
   ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/dag/get.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/dag/put.d.ts:7:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

7 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/dag/resolve.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/dag/tree.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/dht.d.ts:18:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

18 export = _exports;
   ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/dns.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/chmod.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/cp.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/flush.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/index.d.ts:9:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

9 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/ls.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/mkdir.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/mv.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/read.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/rm.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/stat.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/touch.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/files/write.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/gc-lock.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/id.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/index.d.ts:260:29 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

260 type LibP2POptions = import("libp2p/src/").Libp2pOptions & import("libp2p/src/").constructorOptions;
                                ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/index.d.ts:260:67 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

260 type LibP2POptions = import("libp2p/src/").Libp2pOptions & import("libp2p/src/").constructorOptions;
                                                                      ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/index.d.ts:335:22 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

335 type LibP2P = import("libp2p/src/");
                         ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/key/gen.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/key/rename.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/key/rm.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/libp2p.d.ts:9:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

9 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/libp2p.d.ts:17:29 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

17 export type LibP2P = import("libp2p/src/");
                               ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/libp2p.d.ts:18:30 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

18 export type Options = import("libp2p/src/").Libp2pOptions & import("libp2p/src/").constructorOptions;
                                ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/libp2p.d.ts:18:68 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

18 export type Options = import("libp2p/src/").Libp2pOptions & import("libp2p/src/").constructorOptions;
                                                                      ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/name/publish.d.ts:8:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

8 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/name/resolve.d.ts:8:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

8 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/network.d.ts:18:20 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

18     libp2p: import("libp2p/src/");
                      ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/network.d.ts:31:22 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

31 type LibP2P = import("libp2p/src/");
                        ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/object/get.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/object/new.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/object/put.d.ts:6:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

6 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/object/stat.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/pin/add-all.d.ts:6:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

6 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/pin/add.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/pin/ls.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/pin/rm-all.d.ts:6:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

6 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/pin/rm.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/ping.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/pubsub.d.ts:11:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

11 export = _exports;
   ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/refs/index.d.ts:10:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

10 export = _exports;
   ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/repo/gc.d.ts:7:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

7 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/resolve.d.ts:5:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

5 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/stats/bw.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/stats/bw.d.ts:29:29 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

29 export type LibP2P = import("libp2p/src/");
                               ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/stats/index.d.ts:29:22 - error TS2307: Cannot find module 'libp2p/src/' or its corresponding type declarations.

29 type LibP2P = import("libp2p/src/");
                        ~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/swarm/addrs.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/swarm/peers.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/components/version.d.ts:4:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

4 export = _exports;
  ~~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/index.d.ts:6:28 - error TS2307: Cannot find module 'multibase/src/' or its corresponding type declarations.

6 import multibase = require("multibase/src/");
                             ~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/index.d.ts:9:29 - error TS2307: Cannot find module 'multicodec/src/' or its corresponding type declarations.

9 import multicodec = require("multicodec/src/");
                              ~~~~~~~~~~~~~~~~~

node_modules/ipfs-core/dist/src/index.d.ts:13:26 - error TS2304: Cannot find name 'isIPFS'.

13 export { create, crypto, isIPFS, CID, multiaddr, multibase, multihashing, multicodec, PeerId, globSource, urlSource };
                            ~~~~~~

node_modules/ipfs-utils/dist/src/files/glob-source.d.ts:21:21 - error TS7016: Could not find a declaration file for module 'fs-extra'. 'C:/Users/Jonathan/Desktop/wildboar/api2.vis.apps.wildboarsoftware.com/node_modules/fs-extra/lib/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/fs-extra` if it exists or add a new declaration (.d.ts) file containing `declare module 'fs-extra';`

21 import fs = require("fs-extra");

@JonathanWilbur
Copy link
Author

Configuration

tsconfig.json

{
    "compilerOptions": {
        /* Basic Options */
        "target": "ES2020",
        "module": "commonjs",
        // "lib": [],
        "allowJs": false,
        // "checkJs": true,
        // "jsx": "preserve",
        "declaration": true,
        "declarationMap": true,
        "sourceMap": true,
        // "outFile": "./",
        "outDir": "./dist/node",
        // "rootDir": "./",
        // "composite": true,
        "removeComments": true,
        // "noEmit": true,
        "importHelpers": true,
        // "downlevelIteration": true,
        // "isolatedModules": true,
        "strict": true,
        "noImplicitAny": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "strictPropertyInitialization": true,
        "noImplicitThis": true,
        "alwaysStrict": true,
        "noUnusedLocals": false,
        "noUnusedParameters": false,
        "noImplicitReturns": true,
        "noFallthroughCasesInSwitch": true,
        "resolveJsonModule": true,
        // "moduleResolution": "node",
        // "baseUrl": "./",
        // "paths": {},
        // "rootDirs": [],
        // "typeRoots": [],
        // "types": [],
        // "allowSyntheticDefaultImports": true,
        "esModuleInterop": true
        // "preserveSymlinks": true,
        // "sourceRoot": "",
        // "mapRoot": "",
        // "inlineSourceMap": true,
        // "inlineSources": true,
        // "experimentalDecorators": true,
        // "emitDecoratorMetadata": true,
    },
    "include": [
        "source/**/*.ts",
        "source/**/*.json",
    ],
    "exclude": [
        "node_modules",
        "**/*.spec.ts"
    ]
}

@ocknamo
Copy link

ocknamo commented Mar 8, 2021

I had same errors.

This problem has been resolved by to enable skipLibCheck in tsconfig.

skipLibCheck: true

@achingbrain
Copy link
Member

The next js-IPFS release should have vastly improved typings, but in the mean time yes - please set skipLibCheck: true.

@achingbrain achingbrain added kind/support A question or request for support and removed need/triage Needs initial labeling and prioritization labels Mar 8, 2021
@JonathanWilbur
Copy link
Author

If it's cool with you, I'll just leave this issue open until the new typings release, since this is still a problem, even though there is a workaround. Thanks for all your great work! I <3 IPFS!

@achingbrain achingbrain linked a pull request Mar 21, 2021 that will close this issue
28 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants