Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found on building Webpack #8364

Closed
shanalikhan opened this issue Nov 9, 2018 · 2 comments
Closed

Module not found on building Webpack #8364

shanalikhan opened this issue Nov 9, 2018 · 2 comments

Comments

@shanalikhan
Copy link

Following is my config


const path = require("path");

const BUILD_PATH = path.join(__dirname, "./out");

// See https://github.com/Microsoft/vscode/blob/master/extensions/shared.webpack.config.js
module.exports = {
    mode: "production",
    target: "node",
    node: {
        __dirname: false
    },
    entry: {
        extension: ["./src/extension"]
    },
    output: {
        path: BUILD_PATH,
        filename: "[name].js",
        libraryTarget: "commonjs",
    },
    resolve: {
        extensions: [".ts", ".js"]
    },
    externals: {
        "vscode": "commonjs vscode"
    },
    module: {
        rules: [
            {
                test: /\.ts$/,
                use: [
                    {
                        loader: "ts-loader"
                    }
                ],
                exclude: /node_modules/
            },
            {
                test: /\.mjs$/,
                type: "javascript/auto",
                use: []
            }
        ]
    },
    stats: {
        children: false,
        modules: false
    }
};

I am getting the following error:

/Documents/code-settings-sync  v3.2.1 ✗                                                                                                                                      15d ⚑ ◒
▶ npm run webpack

> code-settings-sync@3.2.0 webpack /home/shan/Documents/code-settings-sync
> webpack --mode development

Hash: 78e33b847327f3965275
Version: webpack 4.25.1
Time: 4502ms
Built at: 11/09/2018 3:35:14 PM
       Asset      Size     Chunks             Chunk Names
extension.js  1.82 MiB  extension  [emitted]  extension
Entrypoint extension = extension.js

WARNING in ./src/localize.ts 89:40-89
Critical dependency: the request of a dependency is an expression
 @ ./src/extension.ts
 @ multi ./src/extension

WARNING in ./src/localize.ts 94:18-43
Critical dependency: the request of a dependency is an expression
 @ ./src/extension.ts
 @ multi ./src/extension

WARNING in ./node_modules/node-fetch/lib/index.mjs
Module not found: Error: Can't resolve 'encoding' in '/home/shan/Documents/code-settings-sync/node_modules/node-fetch/lib'
 @ ./node_modules/node-fetch/lib/index.mjs
 @ ./node_modules/@octokit/rest/lib/request/request.js
 @ ./node_modules/@octokit/rest/lib/request/index.js
 @ ./node_modules/@octokit/rest/index.js
 @ ./src/service/githubService.ts
 @ ./src/sync.ts
 @ ./src/extension.ts
 @ multi ./src/extension

WARNING in ./node_modules/chokidar/lib/fsevents-handler.js
Module not found: Error: Can't resolve 'fsevents' in '/home/shan/Documents/code-settings-sync/node_modules/chokidar/lib'
 @ ./node_modules/chokidar/lib/fsevents-handler.js
 @ ./node_modules/chokidar/index.js
 @ ./src/commons.ts
 @ ./src/sync.ts
 @ ./src/extension.ts
 @ multi ./src/extension

WARNING in ./node_modules/adm-zip/util/fileSystem.js
Module not found: Error: Can't resolve 'original-fs' in '/home/shan/Documents/code-settings-sync/node_modules/adm-zip/util'
 @ ./node_modules/adm-zip/util/fileSystem.js
 @ ./node_modules/adm-zip/util/index.js
 @ ./node_modules/adm-zip/adm-zip.js
 @ ./src/util.ts
 @ ./src/commons.ts
 @ ./src/sync.ts
 @ ./src/extension.ts
 @ multi ./src/extension

Mostly errors are in other packages like adm-zip how to solve them

@shanalikhan shanalikhan changed the title Module not found on bulding Webpack Module not found on building Webpack Nov 9, 2018
@alexander-akait
Copy link
Member

It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.

@shanalikhan
Copy link
Author

#8365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants