webpack -v无休止地声明必须安装一个用于webpack的CLI

时间:2018-06-05 21:42:37

标签: webpack visual-studio-2017

我安装了npm版本5.60。

在我的package.json中,我有以下两个devDependencies:

"webpack": "~1.12.15",
"webpack-cli": "^3.0.2"

每当我在命令行中输入webpackwebpack -v时,我总会收到相同的响应:

One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
   The original webpack full-featured CLI.
 - webpack-command (https://github.com/webpack-contrib/webpack-command)
   A lightweight, opinionated webpack CLI.
We will use "npm" to install the CLI via "npm install -D".
Which one do you like to install (webpack-cli/webpack-command):

我已在此处输入webpack-cli,我也通过npm install --save-dev webpack-cli

安装了它

我还尝试将webpack任务运行器添加到visual studio。我的解决方案已经有一个现有的webpack.config.js文件。当我选择它时,我得到蓝色图标,表明它使用webpack任务运行器,但任务运行器中没有任何内容。我认为这只是webpack未正确安装的症状。

我在Windows 10 64中使用VS 2017。

任何帮助表示感谢。

3 个答案:

答案 0 :(得分:15)

尝试使用npm install webpack-cli -g

答案 1 :(得分:2)

请尝试以下步骤:

npm卸载webpack --save-dev

然后更改并再次执行以下步骤

npm install webpack@2.1.0-beta.22 --save-dev

现在检查您的webpack.config.js并在“ webpack.config.js”中将“ loaders”更改为“ rules”。以下是对我有用的代码:-

DECLARE
    miles_cond   VARCHAR2(20) := ' > 43000';
    v_where      VARCHAR2(1000);
    x            SYS_REFCURSOR;
BEGIN
    SELECT
        ' WHERE '
        ||
            LISTAGG(column_name,' + ') WITHIN GROUP(
                ORDER BY
                    column_name
            )
        || miles_cond
    INTO v_where
    FROM
        all_tab_columns
    WHERE
        owner = 'BBI_BC'
        AND table_name = 'TRUCKS'
        AND REGEXP_LIKE ( column_name,
                          '201[0-2]_MILES' )
    ORDER BY
        column_id;

    OPEN x FOR 'SELECT * FROM TRUCKS' || v_where;

    dbms_sql.return_result(x);
END;
/

答案 2 :(得分:0)

您可以尝试通过webpackyarn运行npx命令:
yarn run webpack

npx webpack