Javascript 纱线不会建造这个项目

Javascript 纱线不会建造这个项目,javascript,node.js,windows,yarnpkg,Javascript,Node.js,Windows,Yarnpkg,我正在看一看。我在win10中使用节点11.5。我以前从未使用过纱线,但我遵循了回购协议底部的说明: # Clone the repository. git clone https://github.com/intoli/remote-browser.git cd remote-browser # Install the dependencies. yarn install # Build the project. yarn build # Run the tests. yarn test

我正在看一看。我在win10中使用节点11.5。我以前从未使用过纱线,但我遵循了回购协议底部的说明:

# Clone the repository.
git clone https://github.com/intoli/remote-browser.git
cd remote-browser

# Install the dependencies.
yarn install

# Build the project.
yarn build

# Run the tests.
yarn test
我将构建脚本更改为:

    "build": "Set NODE_ENV=production webpack --config webpack"
如果我理解正确,它应该在windows上工作

然而

$ yarn -v
1.17.3

$ yarn build
yarn run v1.17.3
$ Set NODE_ENV=production webpack --config webpack
Done in 0.31s.
但是我没有看到根目录中添加了DST文件夹

我做错了什么

编辑2:

{
  "name": "remote-browser",
  "version": "0.0.15",
  "description": "A low-level browser automation framework built on top of the Web Extensions API standard. ",
  "main": "index.js",
  "repository": "git@github.com:intoli/remote-browser.git",
  "author": "Intoli, LLC <contact@intoli.com>",
  "license": "BSD",
  "scripts": {
    "build": "Set NODE_ENV=production webpack --config webpack",
    "build:web": "NODE_ENV=production webpack --config webpack/web-client.config.js",
    "postversion": "git push && git push --tags",
    "test": "npm run build && NODE_ENV=test mocha --exit --require babel-core/register",
    "test-fast": "NODE_ENV=test mocha --exit --require babel-core/register --invert --grep Browser",
    "watch": "NODE_ENV=development webpack --watch --config webpack"
  },
  "devDependencies": {
    "babel-core": "^6.26.0",
    "babel-eslint": "^8.0.2",
    "babel-loader": "^7.1.2",
    "babel-plugin-transform-builtin-extend": "^1.1.2",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "clean-webpack-plugin": "^0.1.17",
    "copy-webpack-plugin": "^4.2.1",
    "eslint": "^4.11.0",
    "eslint-config-airbnb": "^16.1.0",
    "eslint-loader": "^1.9.0",
    "eslint-plugin-import": "^2.8.0",
    "imports-loader": "^0.7.1",
    "jimp": "^0.2.28",
    "mocha": "^4.0.1",
    "null-loader": "^0.1.1",
    "source-map-support": "^0.5.0",
    "webextension-polyfill": "^0.2.1",
    "webpack": "^3.8.1",
    "webpack-chrome-extension-reloader": "^0.6.6"
  },
  "dependencies": {
    "chromedriver": "^2.37.0",
    "express": "^4.16.2",
    "express-ws": "^3.0.0",
    "geckodriver": "^1.11.0",
    "isomorphic-fetch": "^2.2.1",
    "portfinder": "^1.0.13",
    "selenium-webdriver": "^4.0.0-alpha.1",
    "simple-websocket": "^5.1.0",
    "ws": "^3.3.2"
  }
}

出现了dist文件夹

您可以尝试以下操作:

build:Set NODE_ENV=production&&webpack-config webpack


有时,额外的空间可以解释为属于env值。

Edward,一个问题-新创建的dist/index.js文件有43000行长,这有意义吗?是的,在这种情况下。如果查看以Hash:869f2cfe024e1c4b19ca开头的第二个文件列表,您将看到所有被合并以生成dist/index.js的文件。如果最终文件大小太大,无法满足您的需要,您可以研究网页优化和代码拆分。
$ yarn build
yarn run v1.17.3
$ Set NODE_ENV=production&&webpack --config webpack
clean-webpack-plugin: ....\js\remote-browser\dist\extension has been removed.
Hash: 9cc6d50b90cbe6cd42f3869f2cfe024e1c4b19ca
Version: webpack 3.8.1
Child
    Hash: 9cc6d50b90cbe6cd42f3
Time: 10574ms
             Asset       Size  Chunks             Chunk Names
     background.js     233 kB       0  [emitted]  background
        content.js    36.3 kB       1  [emitted]  content
          popup.js    30.9 kB       2  [emitted]  popup
 background.js.map     292 kB       0  [emitted]  background
    content.js.map    45.7 kB       1  [emitted]  content
      popup.js.map    39.2 kB       2  [emitted]  popup
     manifest.json    1.24 kB          [emitted]
        popup.html    1.22 kB          [emitted]
         popup.css  466 bytes          [emitted]
img/icon-32x32.png  939 bytes          [emitted]
   [1] ./src/errors.js 3.02 kB {0} {1} [built]
   [3] (webpack)/buildin/global.js 488 bytes {0} [built]
   [7] ./src/common.js 2.37 kB {0} {1} [built]
  [19] ./src/extension/background.js 8.07 kB {0} [built]
  [20] ./src/connections/client.js 1.59 kB {0} [built]
  [36] ./src/connections/base.js 3.76 kB {0} [built]
  [37] ./src/extension/content.js 972 bytes {1} [built]
  [38] ./src/extension/popup.js 1.14 kB {2} [built]
    + 31 hidden modules
Child
Hash: 869f2cfe024e1c4b19ca
Time: 11522ms
       Asset     Size  Chunks                    Chunk Names
    index.js  1.42 MB       0  [emitted]  [big]  index
index.js.map  1.75 MB       0  [emitted]         index
  [29] ./src/errors.js 3.02 kB {0} [built]
  [35] ./src/common.js 2.37 kB {0} [built]
  [53] ./src/launchers.js 2.16 kB {0} [built]
 [108] ./src/connections/base.js 3.76 kB {0} [built]
 [109] ./src/connections/proxy.js 4.2 kB {0} [built]
 [112] ./src/index.js 1.08 kB {0} [built]
 [174] ./src/browser.js 8.21 kB {0} [built]
 [199] ./node_modules/encoding/lib 160 bytes {0} [optional] [built]
 [203] ./src/connections/index.js 612 bytes {0} [built]
 [204] ./src/connections/client.js 1.59 kB {0} [built]
 [219] ./src/connections/server.js 1.46 kB {0} [built]
    + 210 hidden modules

WARNING in ./node_modules/encoding/lib/iconv-loader.js
9:12-34 Critical dependency: the request of a dependency is an expression
 @ ./node_modules/encoding/lib/iconv-loader.js
 @ ./node_modules/encoding/lib/encoding.js
 @ ./node_modules/node-fetch/lib/body.js
 @ ./node_modules/node-fetch/index.js
 @ ./node_modules/isomorphic-fetch/fetch-npm-node.js
 @ ./src/browser.js
 @ ./src/index.js
 Done in 21.93s.