issue with an older nodejs code import { resolve } - node.js

I have an older version of code written in 2017 using React.
Getting this error while running npm run start. Not to sure if it is node version related.
Using node v: 10.16.2
$ npm run start
> starter-kit-react#0.0.1 start C:\xampp\htdocs\react\tool-master
> webpack-dev-server --host 0.0.0.0 --port 8080
C:\xampp\htdocs\react\tool-master\webpack.config.babel.js:4
import { resolve } from 'path';
^
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:723:23)
at loader (C:\xampp\htdocs\react\tool-master\node_modules\babel-register\lib\node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (C:\xampp\htdocs\react\tool-master\node_modules\babel-register\lib\node.js:154:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at requireConfig (C:\xampp\htdocs\react\tool-master\node_modules\webpack\bin\convert-argv.js:96:18)
at C:\xampp\htdocs\react\tool-master\node_modules\webpack\bin\convert-argv.js:109:17
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! starter-kit-react#0.0.1 start: `webpack-dev-server --host 0.0.0.0 --port 8080`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the starter-kit-react#0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2019-08-08T00_15_37_258Z-debug.log
I was able to go past this step after upgrading babel
Babel Upgrade details here
However, now I am stuck where code is showing the below error. Initially it showed the processing went well and then stuck at some syntax error. Not sure what it is.
render(
<Provider store={store}>
<ContentProvider lang="en">
<App />
</ContentProvider>
</Provider>,
document.getElementById('app')
);
Error shown below:
$ yarn start
yarn run v1.17.3
$ webpack-dev-server --host 0.0.0.0 --port 8080
Project is running at http://0.0.0.0:8080/
webpack output is served from /
Hash: b06107c62fb824ae192d
Version: webpack 2.7.0
Time: 498ms
Asset Size Chunks Chunk Names
vendor.e33c4b5498769f380132.js 326 kB 0 [emitted] [big] vendor
app.955a9ae9e538a29c3be3.js 2.58 kB 1 [emitted] app
manifest.58eaa606281aa83df76a.js 6.07 kB 2 [emitted] manifest
vendor.e33c4b5498769f380132.js.map 387 kB 0 [emitted] vendor
app.955a9ae9e538a29c3be3.js.map 104 bytes 1 [emitted] app
manifest.58eaa606281aa83df76a.js.map 6.17 kB 2 [emitted] manifest
index.html 126 bytes [emitted]
chunk {0} vendor.e33c4b5498769f380132.js, vendor.e33c4b5498769f380132.js.map (vendor) 323 kB {2} [initial] [rendered]
[3] (webpack)-dev-server/client?http://0.0.0.0:8080 7.93 kB {0} [built]
[4] ./~/ansi-html/index.js 4.26 kB {0} [built]
[5] ./~/ansi-regex/index.js 135 bytes {0} [built]
[6] ./~/html-entities/index.js 231 bytes {0} [built]
[9] ./~/loglevel/lib/loglevel.js 7.86 kB {0} [built]
[10] ./~/node-libs-browser/~/events/events.js 13.6 kB {0} [built]
[11] ./~/node-libs-browser/~/punycode/punycode.js 14.7 kB {0} [built]
[15] ./~/sockjs-client/dist/sockjs.js 181 kB {0} [built]
[16] ./~/strip-ansi/index.js 161 bytes {0} [built]
[17] ./~/url/url.js 23.3 kB {0} [built]
[18] ./~/url/util.js 314 bytes {0} [built]
[19] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built]
[20] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built]
[22] (webpack)/hot nonrecursive ^\.\/log$ 160 bytes {0} [built]
[23] (webpack)/hot/emitter.js 77 bytes {0} [built]
+ 8 hidden modules
chunk {1} app.955a9ae9e538a29c3be3.js, app.955a9ae9e538a29c3be3.js.map (app) 2.34 kB {0} [initial] [rendered]
[2] ./src/index.jsx 2.3 kB {1} [built] [failed] [1 error]
[24] multi (webpack)-dev-server/client?http://0.0.0.0:8080 ./src/index 40 bytes {1} [built]
chunk {2} manifest.58eaa606281aa83df76a.js, manifest.58eaa606281aa83df76a.js.map (manifest) 0 bytes [entry] [rendered]
ERROR in ./src/index.jsx
Module build failed: SyntaxError: C:\xampp\htdocs\react\tool-master\src\index.jsx: Unexpected token (18:2)
16 |
17 | render(
> 18 | <Provider store={store}>
| ^
19 | <ContentProvider lang="en">
20 | <App />
21 | </ContentProvider>
at Parser.raise (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:6325:17)
at Parser.unexpected (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:7642:16)
at Parser.parseExprAtom (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8841:20)
at Parser.parseExprSubscripts (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8412:23)
at Parser.parseMaybeUnary (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8392:21)
at Parser.parseExprOps (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8267:23)
at Parser.parseMaybeConditional (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8240:23)
at Parser.parseMaybeAssign (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8187:21)
at Parser.parseExprListItem (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:9491:18)
at Parser.parseCallExpressionArguments (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8621:22)
at Parser.parseSubscript (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8514:29)
at Parser.parseSubscripts (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8433:19)
at Parser.parseExprSubscripts (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8422:17)
at Parser.parseMaybeUnary (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8392:21)
at Parser.parseExprOps (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8267:23)
at Parser.parseMaybeConditional (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8240:23)
# multi (webpack)-dev-server/client?http://0.0.0.0:8080 ./src/index
Child html-webpack-plugin for "index.html":
chunk {0} index.html 542 kB [entry] [rendered]
[0] ./~/lodash/lodash.js 541 kB {0} [built]
[1] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 538 bytes {0} [built]
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
[3] (webpack)/buildin/module.js 517 bytes {0} [built]
webpack: Failed to compile.

Related

Why can't i see my home page in Heroku (with Nodejs)?

This is my project: https://github.com/dade1987/StockPricePrediction
I deployed it in Heroku but i can't see my homepage on this link: https://price-predictor-eu.herokuapp.com/
I see it locally.
Heroku says:
2020-06-27T10:33:17.545687+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=price-predictor-eu.herokuapp.com request_id=be6efc89-ba70-4ba8-bb4e-26b85ccce869 fwd="151.36.107.145" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
I tried to do it too:
webpack-dev-server route
✖ 「wdm」: Hash: 6575b1f5bc373f461724
Version: webpack 4.28.4
Time: 5599ms
Built at: 06/27/2020 2:53:13 PM
1 asset
Entrypoint main = bundle.js
[0] (webpack)-dev-server/client/clients/SockJSClient.js 4.06 KiB {0} [built]
[2] (webpack)-dev-server/client/utils/log.js 964 bytes {0} [built]
[3] multi (webpack)-dev-server/client?http://0.0.0.0:8080 route 40 bytes {0} [built]
[4] (webpack)-dev-server/client?http://0.0.0.0:8080 4.29 KiB {0} [built]
[5] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[6] ./node_modules/ansi-regex/index.js 135 bytes {0} [built]
[7] (webpack)-dev-server/client/socket.js 1.53 KiB {0} [built]
[10] (webpack)-dev-server/client/overlay.js 3.51 KiB {0} [built]
[11] ./node_modules/ansi-html/index.js 4.16 KiB {0} [built]
[12] ./node_modules/html-entities/lib/index.js 449 bytes {0} [built]
[16] ./node_modules/loglevel/lib/loglevel.js 8.41 KiB {0} [built]
[17] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {0} [built]
[18] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {0} [built]
[21] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {0} [built]
[30] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {0} [built]
+ 17 hidden modules
ERROR in Entry module not found: Error: Can't resolve 'route' in '/app'
ERROR in multi (webpack)-dev-server/client?http://0.0.0.0:8080 route
Module not found: Error: Can't resolve 'route' in '/app'
# multi (webpack)-dev-server/client?http://0.0.0.0:8080 route main[1]
Where is my error? I am not very expert in node.
Thank you

How to get file path from user using Powershell Read-Host?

I am trying to get file path from user using Read-Host and check if such a file is present in that location or not.
$choice = Read-Host -Prompt 'Do you like to run the flyway command?[yes:no]'
if($choice -eq 'yes'){
[string]$fileToCheck = Read-Host -Prompt 'Enter the path to the flyway configuration file. For example C:\Users\admin\Desktop\flyway.conf'
if(Test-Path $fileToCheck -PathType leaf){
mvn -Dflyway.configFiles=$fileToCheck flyway:info
mvn -Dflyway.configFiles=$fileToCheck flyway:migrate
mvn -Dflyway.configFiles=$fileToCheck flyway:info
}
else{
Write-Host 'Flyway configuration file not present. Enter correct path.'
}
}
When the maven command gets executed, i get the following error.
Enter the path to the flyway configuration file. For example C:\Users\admin\Desktop\flyway.conf: C:\Users\akshay\Desktop\flyway.conf
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Progress (1): 2.2/14 kB
Progress (1): 5.0/14 kB
Progress (1): 7.8/14 kB
Progress (1): 11/14 kB
Progress (2): 11/14 kB | 2.3/20 kB
Progress (2): 11/14 kB | 5.0/20 kB
Progress (2): 11/14 kB | 7.8/20 kB
Progress (2): 11/14 kB | 11/20 kB
Progress (2): 13/14 kB | 11/20 kB
Progress (2): 14 kB | 11/20 kB
Progress (2): 14 kB | 13/20 kB
Progress (2): 14 kB | 16/20 kB
Progress (2): 14 kB | 19/20 kB
Progress (2): 14 kB | 20 kB
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 12 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 18 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.037 s
[INFO] Finished at: 2020-03-23T17:08:53+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix '.configFiles=C' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] availa
ble from the repositories [local (C:\Users\akshay\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
I am unable to use the complete path of the file for the argument flyway.configFiles. Only C gets appended there.

oom invoked even though enough memory available

I use Android P-OS. and kernel version is msm-4.14
oom invoked and killing process since booting up. However, memory is abundant.
My memory size is 8GByte, Swap is 1GByte.
I'm not even using a swap.
[ 59.901334] Killing 'ndroid.keychain' (2011), adj 906,\x0a to free 87268kB on behalf of 'Binder:883_2' (938)\x0a Free CMA is 246200kB\x0a Total reserve is 242332kB\x0a Total free pages is 5100764kB\x0a Total file cache is 978224kB
[ 59.903948] Killing 'Jit thread pool' (2016), adj 906,\x0a to free 88676kB on behalf of 'ActivityManager' (960)\x0a Free CMA is 246200kB\x0a Total reserve is 242332kB\x0a Total free pages is 5100764kB\x0a Total file cache is 978224kB
[ 60.007328] oom_reaper: reaped process 2011 (ndroid.keychain), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
$ free
total used free shared buffers
Mem: 7842377728 3144630272 4697747456 2084864 14852096
-/+ buffers/cache: 3129778176 4712599552
Swap: 1073737728 0 1073737728
$ meminfo
MemTotal: 7658572 kB
MemFree: 4589120 kB
MemAvailable: 5800580 kB
Buffers: 14416 kB
Cached: 1415944 kB
SwapCached: 0 kB
Active: 630232 kB
Inactive: 1299508 kB
Active(anon): 501820 kB
Inactive(anon): 1876 kB
Active(file): 128412 kB
Inactive(file): 1297632 kB
Unevictable: 2888 kB
Mlocked: 2888 kB
SwapTotal: 1048572 kB
SwapFree: 1048572 kB
Dirty: 92 kB
Writeback: 0 kB
AnonPages: 502148 kB
Mapped: 745728 kB
Shmem: 2036 kB
Slab: 520776 kB
SReclaimable: 130688 kB
SUnreclaim: 390088 kB
KernelStack: 28336 kB
PageTables: 40972 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4877856 kB
Committed_AS: 95986336 kB
VmallocTotal: 263061440 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
CmaTotal: 303104 kB
CmaFree: 246200 kB
I don't understand this situation.
Why does this happen? Is there a way to avoid it?
Answer Myself
It is not Out Of Memory.
Just oom_reaper is working by sigkill signal.
Memory is enough
Thanks

Pact-js - Provider/Consumer test missing files in the repository

Hi everyone, I am trying to implement PACT JS. Currently I am referring to this implementation :
npm install (or yarn install) and the consumer side command (mocha app/client/spec/PostServiceClient.spec.js) worked well.The pact file was generated.
But the provider side command (node app/service/spec/PostService.spec.js) failed.It's seemed due to the localhost server. But i didn't succeed in running the server. It missed 'THREE' module.
After adding 'THREE' module, i couldn't compile the build. So 2 files are missing in the repository main.js and Template.html (--> webpack.config.js).
And i didn't succeed in posting a comment in Lucas M Blog (http://hecodes.com/2016/10/better-testing-microservices-using-consumer-driven-contracts-node-js/)
Could someone help me?
Wilson Mahann
Thanks a lot for your help
Error messages trying to run the server
$ yarn server
yarn run v1.9.4
$ webpack-dev-server --host 0.0.0.0 --config webpack.config.js --devtool eval --progress --hot --inline
module.js:550
throw err;
^
Error: Cannot find module 'three'
at Function.Module._resolveFilename (module.js:548:15)
at Function.resolve (internal/module.js:18:19)
at Object. (D:\Workspace\pact-js\js00\pact-node-example-master\webpack.config.js:34:31)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at module.exports (D:\Workspace\pact-js\js00\pact-node-example-master\node_modules\webpack\bin\convert-argv.js:80:13)
at Object. (D:\Workspace\pact-js\js00\pact-node-example-master\node_modules\webpack-dev-server\bin\webpack-dev-server.js:68:48)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
So I had successfully the missing module "three" : yarn add three
And run the server
$ yarn server
yarn run v1.9.4
$ webpack-dev-server --host 0.0.0.0 --config webpack.config.js --devtool eval --progress --hot --inline
clean-webpack-plugin: D:\Workspace\pact-js\js00\pact-node-example-master\dist has been removed. 70% 1/1 build modules
http://0.0.0.0:8080/
webpack result is served from /
content is served from ./app 30% 1/3 build modulescontent is served from ./app 44% 4/7 build modulescontent is served from ./app 61% 6/7 build modulescontent is served from ./app 54% 12/16 build modulescontent is served from ./app 62% 15/17 build modulescontent is served from ./app 45% 16/27 build modulescontent is served from ./app 35% 19/44 build modulescontent is served from ./app 49% 29/44 build modulescontent is served from ./app 65% 42/45 build modulescontent is served from ./app 48% 44/69 build modulescontent is served from ./app 52% 49/69 build modulescontent is served from ./app 62% 60/69 build modulescontent is served from ./app 66% 67/71 build modulescontent is served from ./app 69% 75/76 build modulescontent is served from ./app Hash: 2948e04a9d9577c7951d
Version: webpack 1.15.0
Time: 569ms
Asset Size Chunks Chunk Names
bundle.2948e04a9d9577c7951d.js 285 kB 0 [emitted] app
index.html 2.27 kB [emitted]
chunk {0} bundle.2948e04a9d9577c7951d.js (app) 227 kB [rendered]
[0] multi app 52 bytes {0} [built] [1 error]
[1] (webpack)-dev-server/client?http://0.0.0.0:8080 4.16 kB {0} [built]
[2] ./~/url/url.js 23.3 kB {0} [built]
[3] ./~/url/~/punycode/punycode.js 14.6 kB {0} [built]
[4] (webpack)/buildin/module.js 251 bytes {0} [built]
[5] ./~/url/util.js 314 bytes {0} [built]
[6] ./~/querystring/index.js 127 bytes {0} [built]
[7] ./~/querystring/decode.js 2.4 kB {0} [built]
[8] ./~/querystring/encode.js 2.09 kB {0} [built]
[9] ./~/strip-ansi/index.js 161 bytes {0} [built]
[10] ./~/ansi-regex/index.js 135 bytes {0} [built]
[11] (webpack)-dev-server/client/socket.js 897 bytes {0} [built]
[12] ./~/sockjs-client/lib/entry.js 244 bytes {0} [built]
[13] ./~/sockjs-client/lib/transport-list.js 613 bytes {0} [built]
[14] ./~/sockjs-client/lib/transport/websocket.js 2.72 kB {0} [built]
[15] ./~/process/browser.js 5.42 kB {0} [built]
[16] ./~/sockjs-client/lib/utils/event.js 2 kB {0} [built]
[17] ./~/sockjs-client/lib/utils/random.js 746 bytes {0} [built]
[18] ./~/sockjs-client/lib/utils/browser-crypto.js 438 bytes {0} [built]
[19] ./~/sockjs-client/lib/utils/url.js 975 bytes {0} [built]
[20] ./~/url-parse/index.js 12 kB {0} [built]
[21] ./~/requires-port/index.js 753 bytes {0} [built]
[22] ./~/querystringify/index.js 1.58 kB {0} [built]
[23] ./~/debug/src/browser.js 4.73 kB {0} [built]
[24] ./~/debug/src/debug.js 4.39 kB {0} [built]
[25] ./~/ms/index.js 2.76 kB {0} [built]
[26] ./~/inherits/inherits_browser.js 672 bytes {0} [built]
[27] ./~/sockjs-client/lib/event/emitter.js 1.27 kB {0} [built]
[28] ./~/sockjs-client/lib/event/eventtarget.js 1.85 kB {0} [built]
[29] ./~/sockjs-client/lib/transport/browser/websocket.js 210 bytes {0} [built]
[30] ./~/sockjs-client/lib/transport/xhr-streaming.js 1.25 kB {0} [built]
[31] ./~/sockjs-client/lib/transport/lib/ajax-based.js 1.31 kB {0} [built]
[32] ./~/sockjs-client/lib/transport/lib/sender-receiver.js 1.18 kB {0} [built]
[33] ./~/sockjs-client/lib/transport/lib/buffered-sender.js 2.3 kB {0} [built]
[34] ./~/sockjs-client/lib/transport/lib/polling.js 1.32 kB {0} [built]
[35] ./~/sockjs-client/lib/transport/receiver/xhr.js 1.58 kB {0} [built]
[36] ./~/sockjs-client/lib/transport/sender/xhr-cors.js 343 bytes {0} [built]
[37] ./~/sockjs-client/lib/transport/browser/abstract-xhr.js 4.8 kB {0} [built]
[38] ./~/sockjs-client/lib/transport/sender/xhr-local.js 352 bytes {0} [built]
[39] ./~/sockjs-client/lib/utils/browser.js 560 bytes {0} [built]
[40] ./~/sockjs-client/lib/transport/xdr-streaming.js 984 bytes {0} [built]
[41] ./~/sockjs-client/lib/transport/sender/xdr.js 2.46 kB {0} [built]
[42] ./~/sockjs-client/lib/transport/eventsource.js 766 bytes {0} [built]
[43] ./~/sockjs-client/lib/transport/receiver/eventsource.js 1.58 kB {0} [built]
[44] ./~/sockjs-client/lib/transport/browser/eventsource.js 37 bytes {0} [built]
[45] ./~/sockjs-client/lib/transport/lib/iframe-wrap.js 981 bytes {0} [built]
[46] ./~/sockjs-client/lib/transport/iframe.js 3.83 kB {0} [built]
[47] ./~/json3/lib/json3.js 43.3 kB {0} [built]
[48] (webpack)/buildin/amd-options.js 43 bytes {0} [built]
[49] ./~/sockjs-client/lib/version.js 26 bytes {0} [built]
[50] ./~/sockjs-client/lib/utils/iframe.js 5.04 kB {0} [built]
[51] ./~/sockjs-client/lib/utils/object.js 532 bytes {0} [built]
[52] ./~/sockjs-client/lib/transport/htmlfile.js 710 bytes {0} [built]
[53] ./~/sockjs-client/lib/transport/receiver/htmlfile.js 2.2 kB {0} [built]
[54] ./~/sockjs-client/lib/transport/xhr-polling.js 894 bytes {0} [built]
[55] ./~/sockjs-client/lib/transport/xdr-polling.js 712 bytes {0} [built]
[56] ./~/sockjs-client/lib/transport/jsonp-polling.js 1.02 kB {0} [built]
[57] ./~/sockjs-client/lib/transport/receiver/jsonp.js 5.57 kB {0} [built]
[58] ./~/sockjs-client/lib/transport/sender/jsonp.js 2.46 kB {0} [built]
[59] ./~/sockjs-client/lib/main.js 12 kB {0} [built]
[60] ./~/sockjs-client/lib/shims.js 17.2 kB {0} [built]
[61] ./~/sockjs-client/lib/utils/escape.js 2.36 kB {0} [built]
[62] ./~/sockjs-client/lib/utils/transport.js 1.35 kB {0} [built]
[63] ./~/sockjs-client/lib/utils/log.js 450 bytes {0} [built]
[64] ./~/sockjs-client/lib/event/event.js 477 bytes {0} [built]
[65] ./~/sockjs-client/lib/location.js 178 bytes {0} [built]
[66] ./~/sockjs-client/lib/event/close.js 295 bytes {0} [built]
[67] ./~/sockjs-client/lib/event/trans-message.js 292 bytes {0} [built]
[68] ./~/sockjs-client/lib/info-receiver.js 2.22 kB {0} [built]
[69] ./~/sockjs-client/lib/transport/sender/xhr-fake.js 456 bytes {0} [built]
[70] ./~/sockjs-client/lib/info-iframe.js 1.52 kB {0} [built]
[71] ./~/sockjs-client/lib/info-iframe-receiver.js 791 bytes {0} [built]
[72] ./~/sockjs-client/lib/info-ajax.js 1.03 kB {0} [built]
[73] ./~/sockjs-client/lib/iframe-bootstrap.js 2.9 kB {0} [built]
[74] ./~/sockjs-client/lib/facade.js 723 bytes {0} [built]
[75] (webpack)/hot/dev-server.js 1.85 kB {0} [built]
[76] (webpack)/hot/log-apply-result.js 813 bytes {0} [built]
ERROR in multi app
Module not found: Error: Cannot resolve 'file' or 'directory' ./main.js in D:\Workspace\pact-js\js00\pact-node-example-master\app
# multi app
ERROR in Error: Child compilation failed:
Entry module not found: Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-master\app:
Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-master\app
- compiler.js:76
[pact-node-example-master]/[html-webpack-plugin]/lib/compiler.js:76:16
- Compiler.js:214 Compiler.
[pact-node-example-master]/[webpack]/lib/Compiler.js:214:10
- Compiler.js:403
[pact-node-example-master]/[webpack]/lib/Compiler.js:403:12
- Tapable.js:67 Compiler.next
[pact-node-example-master]/[tapable]/lib/Tapable.js:67:11
- CachePlugin.js:40 Compiler.
[pact-node-example-master]/[webpack]/lib/CachePlugin.js:40:4
- Tapable.js:71 Compiler.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:71:13
- Compiler.js:400 Compiler.
[pact-node-example-master]/[webpack]/lib/Compiler.js:400:9
- Compilation.js:577 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:577:13
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:572 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:572:10
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:567 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:567:9
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:563 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:563:8
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:525 Compilation.seal
[pact-node-example-master]/[webpack]/lib/Compilation.js:525:7
Child html-webpack-plugin for "index.html":
ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-maste
r\app
webpack: Failed to compile.
Finally, i created main.js and Template.html files. And i succeeded in compiling but i dont know what code to implement in my files!!
Thanks a lot

VmSize = physical memory + swap?

I have a little question regarding VmSize, in the documentation it's supposed to be the application's usage of memory.
However on my system:
VmSize = physical memory + swap
VmHWM seems more like what the application actually would be using.
[root#sun ~]# free -m
total used free shared buffers cached
Mem: 12012 9223 2788 0 613 1175
-/+ buffers/cache: 7434 4577
Swap: 3967 0 3967
[root#sun ~]# cat /proc/8268/status
Name: mysqld
State: S (sleeping)
Tgid: 8268
Pid: 8268
PPid: 1
TracerPid: 0
Uid: 89 89 89 89
Gid: 89 89 89 89
FDSize: 512
Groups: 89
VmPeak: 15878128 kB
VmSize: 15878128 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 7036312 kB
VmRSS: 7036312 kB
VmData: 15839272 kB
VmStk: 136 kB
VmExe: 10744 kB
VmLib: 6356 kB
VmPTE: 16208 kB
VmSwap: 0 kB
Threads: 265
SigQ: 0/96048
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000087007
SigIgn: 0000000000001000
SigCgt: 00000001800066e9
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: fff
Cpus_allowed_list: 0-11
Mems_allowed: 00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 2567
nonvoluntary_ctxt_switches: 77
Any idea of why?
I try to get the usage of memory for this application in particular but this result doesn't really make sense.
Thanks.
VMsize is the "address space" that the process has in use: the number of available adresses. These addresses do not have to have any physical memory attached to them. (Attached physical memory is the RSS figure)
You can verify this by allocating a chunk of memory with p = malloc(4 * 1024 * 1024);, and not doing anything to *p: the VmSize will increase by 1K pages, but the RSS will be (about) the same. (your program will have more adressable memory, but it does not address it, so the memory does not need to be attached )
VmSize is the sum of all mapped memory (/proc/pid/maps)

Resources