Git Product home page Git Product logo

Comments (4)

flowersinthesand avatar flowersinthesand commented on May 30, 2024

I met some problem on git bash on Windows in running npm run build.

Donghwan@Donghwan  ~/git/cettia-javascript-client (master)
$ npm run build

> [email protected] build C:\Users\Donghwan\git\cettia-javascript-client
> npm run base && npm run bundler && npm run browser && npm run browserMin


> [email protected] base C:\Users\Donghwan\git\cettia-javascript-client
> babel src/cettia.es6 --out-file cettia.js


> [email protected] bundler C:\Users\Donghwan\git\cettia-javascript-client
> set NODE_ENV=browser && babel src/cettia.es6 --out-file cettia-bundler.js


> [email protected] browser C:\Users\Donghwan\git\cettia-javascript-client
> webpack cettia-bundler.js cettia-browser.js --output-library cettia

Hash: 06645d0166922a9e31e5
Version: webpack 2.5.0
Time: 15047ms
            Asset     Size  Chunks                    Chunk Names
cettia-browser.js  4.91 MB       0  [emitted]  [big]  main
   [2] ./~/buffer/index.js 48.6 kB {0} [built]
  [14] (webpack)/buildin/global.js 509 bytes {0} [built]
  [26] ./~/events/events.js 8.33 kB {0} [built]
  [36] ./~/stream-http/index.js 1.72 kB {0} [built]
  [61] ./~/https-browserify/index.js 325 bytes {0} [built]
 [100] ./~/path-browserify/index.js 6.18 kB {0} [built]
 [155] ./~/jsdom/lib/jsdom.js 12.2 kB {0} [built]
 [292] ./~/eventsource/lib/eventsource.js 8.93 kB {0} [built]
 [293] ./~/msgpack-lite/lib/browser.js 297 bytes {0} [built]
 [294] ./~/traverse/index.js 8.93 kB {0} [built]
 [295] ./~/ws/index.js 1.05 kB {0} [built]
 [296] ./cettia-bundler.js 36.7 kB {0} [built]
 [347] ./~/base64-js/index.js 3.48 kB {0} [built]
 [439] ./~/jsdom/lib/jsdom/browser/Window.js 14.1 kB {0} [built]
 [742] ./~/ws/lib/WebSocketServer.js 15.6 kB {0} [built]
    + 735 hidden modules

WARNING in ./~/ws/lib/BufferUtil.js
Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\ws\lib'
 @ ./~/ws/lib/BufferUtil.js 10:19-40
 @ ./~/ws/lib/Sender.js
 @ ./~/ws/index.js
 @ ./cettia-bundler.js

WARNING in ./~/ws/lib/Validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\ws\lib'
 @ ./~/ws/lib/Validation.js 10:19-44
 @ ./~/ws/lib/Receiver.js
 @ ./~/ws/index.js
 @ ./cettia-bundler.js

WARNING in ./~/source-map/lib/source-map/source-map-generator.js
8:45-52 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/source-map/lib/source-map/source-map-consumer.js
8:45-52 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/source-map/lib/source-map/source-node.js
8:45-52 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./~/ajv/lib/async.js
96:20-33 Critical dependency: the request of a dependency is an expression

WARNING in ./~/ajv/lib/async.js
119:15-28 Critical dependency: the request of a dependency is an expression

WARNING in ./~/ajv/lib/compile/index.js
13:21-34 Critical dependency: the request of a dependency is an expression

ERROR in ./~/jsdom/lib/jsdom.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\jsdom\lib'
 @ ./~/jsdom/lib/jsdom.js 6:11-24
 @ ./cettia-bundler.js

ERROR in ./~/jsdom/lib/jsdom/browser/resource-loader.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\jsdom\lib\jsdom\browser'
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js 5:11-24
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/ws/lib/WebSocketServer.js
Module not found: Error: Can't resolve 'tls' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\ws\lib'
 @ ./~/ws/lib/WebSocketServer.js 15:10-24
 @ ./~/ws/index.js
 @ ./cettia-bundler.js

ERROR in ./~/tough-cookie/lib/cookie.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\tough-cookie\lib'
 @ ./~/tough-cookie/lib/cookie.js 32:10-24
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/jsdom/lib/jsdom/living/xmlhttprequest.js
Module not found: Error: Can't resolve 'child_process' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\jsdom\lib\jsdom\living'
 @ ./~/jsdom/lib/jsdom/living/xmlhttprequest.js 4:18-42
 @ ./~/jsdom/lib/jsdom/browser/Window.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/jsdom/lib/jsdom/living/xhr-utils.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\jsdom\lib\jsdom\living'
 @ ./~/jsdom/lib/jsdom/living/xhr-utils.js 5:11-24
 @ ./~/jsdom/lib/jsdom/living/xmlhttprequest.js
 @ ./~/jsdom/lib/jsdom/browser/Window.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/options/lib/options.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\options\lib'
 @ ./~/options/lib/options.js 6:9-22
 @ ./~/ws/lib/WebSocket.js
 @ ./~/ws/index.js
 @ ./cettia-bundler.js

ERROR in ./~/cssstyle/lib/CSSStyleDeclaration.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\cssstyle\lib'
 @ ./~/cssstyle/lib/CSSStyleDeclaration.js 7:9-22
 @ ./~/jsdom/lib/jsdom/browser/Window.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/request/lib/har.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\request\lib'
 @ ./~/request/lib/har.js 3:9-22
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/forever-agent/index.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\forever-agent'
 @ ./~/forever-agent/index.js 6:10-24
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/forever-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\forever-agent'
 @ ./~/forever-agent/index.js 7:10-24
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/tunnel-agent/index.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\tunnel-agent'
 @ ./~/tunnel-agent/index.js 3:10-24
 @ ./~/request/lib/tunnel.js
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

ERROR in ./~/tunnel-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'C:\Users\Donghwan\git\cettia-javascript-client\node_modules\tunnel-agent'
 @ ./~/tunnel-agent/index.js 4:10-24
 @ ./~/request/lib/tunnel.js
 @ ./~/request/request.js
 @ ./~/request/index.js
 @ ./~/jsdom/lib/jsdom/browser/resource-loader.js
 @ ./~/jsdom/lib/jsdom.js
 @ ./cettia-bundler.js

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "D:\\development\\nodejs\\node-v6.9.1-x64\\node.exe" "C:\\Users\\Donghwan\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "browser"
npm ERR! node v6.9.1
npm ERR! npm  v4.0.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] browser: `webpack cettia-bundler.js cettia-browser.js --output-library cettia`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] browser script 'webpack cettia-bundler.js cettia-browser.js --output-library cettia'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cettia-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack cettia-bundler.js cettia-browser.js --output-library cettia
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cettia-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cettia-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Donghwan\git\cettia-javascript-client\npm-debug.log

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "D:\\development\\nodejs\\node-v6.9.1-x64\\node.exe" "D:\\development\\nodejs\\node-v6.9.1-x64\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `npm run base && npm run bundler && npm run browser && npm run browserMin`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'npm run base && npm run bundler && npm run browser && npm run browserMin'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cettia-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run base && npm run bundler && npm run browser && npm run browserMin
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cettia-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cettia-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Donghwan\git\cettia-javascript-client\npm-debug.log

To run the command on Windows, I had to modify package.json and here's the diff:

diff --git a/package.json b/package.json
index 57d4961..9679220 100644
--- a/package.json
+++ b/package.json
@@ -6,9 +6,9 @@
   "main": "cettia.js",
   "scripts": {
     "test": "grunt test",
-    "build": "npm run base; npm run bundler; npm run browser; npm run browserMin",
+    "build": "npm run base && npm run bundler && npm run browser && npm run browserMin",
     "base": "babel src/cettia.es6 --out-file cettia.js",
-    "bundler": "NODE_ENV=browser babel src/cettia.es6 --out-file cettia-bundler.js",
+    "bundler": "set NODE_ENV=browser && babel src/cettia.es6 --out-file cettia-bundler.js",
     "browser": "webpack cettia-bundler.js cettia-browser.js --output-library cettia",
     "browserMin": "webpack cettia-bundler.js cettia-browser.min.js --output-library cettia --optimize-minimize --optimize-occurence-order"
   },

from cettia-javascript-client.

flowersinthesand avatar flowersinthesand commented on May 30, 2024

There seem to be some problem on my desktop. It works on my Mac.

➜  cettia-javascript-client git:(master) ✗ node -v
v6.8.1
➜  cettia-javascript-client git:(master) ✗ npm -v
3.10.9
➜  cettia-javascript-client git:(master) ✗ npm run build

> [email protected] build /Users/donghwankim/git/cettia-javascript-client
> npm run base; npm run bundler; npm run browser; npm run browserMin


> [email protected] base /Users/donghwankim/git/cettia-javascript-client
> babel src/cettia.es6 --out-file cettia.js


> [email protected] bundler /Users/donghwankim/git/cettia-javascript-client
> NODE_ENV=browser babel src/cettia.es6 --out-file cettia-bundler.js


> [email protected] browser /Users/donghwankim/git/cettia-javascript-client
> webpack cettia-bundler.js cettia-browser.js --output-library cettia

Hash: 3bec2e636e574b7f6229
Version: webpack 1.14.0
Time: 377ms
            Asset    Size  Chunks             Chunk Names
cettia-browser.js  144 kB       0  [emitted]  main
   [0] ./cettia-bundler.js 36.4 kB {0} [built]
    + 27 hidden modules

> [email protected] browserMin /Users/donghwankim/git/cettia-javascript-client
> webpack cettia-bundler.js cettia-browser.min.js --output-library cettia --optimize-minimize --optimize-occurence-order

Hash: 9c064d02dd24da901275
Version: webpack 1.14.0
Time: 1472ms
                Asset     Size  Chunks             Chunk Names
cettia-browser.min.js  55.5 kB       0  [emitted]  main
   [0] ./cettia-bundler.js 36.4 kB {0} [built]
    + 27 hidden modules

WARNING in cettia-browser.min.js from UglifyJs
Side effects in initialization of unused variable _traverse2 [./cettia-bundler.js:7,0]
Condition always true [./~/event-lite/event-lite.js:30,0]

from cettia-javascript-client.

flowersinthesand avatar flowersinthesand commented on May 30, 2024

Done

  • As of ws 1.1+, there's some problem.
  • jsdom 10 requires Node 6
  • webpack 2 doesn't support optimize-occurence-order argument
➜  cettia-javascript-client git:(master) ✗ npm outdated
Package  Current  Wanted  Latest  Location
jsdom     9.12.0  9.12.0  10.1.0  cettia-client
webpack   1.15.0  1.15.0   2.5.0  cettia-client
ws         1.0.1   1.0.1   2.3.1  cettia-client

from cettia-javascript-client.

flowersinthesand avatar flowersinthesand commented on May 30, 2024

It turns out that I should have updated yarn.lock and committed it every time I updated a dependency - 0732fa7

However, I'm not familiar to yarn yet and yarn seems to have some problem with nvm as well. So I would like to use npm instead of yarn at least in this release.

  • Delete yarn.lock.
  • Configure .travis.yml to use npm to install dependencies

from cettia-javascript-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.