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

Having issues regarding running application on local machine #31

Closed
singhrohan62 opened this issue Feb 20, 2019 · 5 comments
Closed

Having issues regarding running application on local machine #31

singhrohan62 opened this issue Feb 20, 2019 · 5 comments

Comments

@singhrohan62
Copy link

Hi @or-else , While working on #30 , I was facing many problems when I cloned the app and ran the app. I found out that @babel/core and @babel.preset-env modules are outdated and need to be updated for development purpose. Also, one more thing I want to discuss is in the webpack.config.js that test key has value which does not allow npm to transpile .js files (like index.js) which causes errors while running npm scripts (I ran npm run build:dev and got error: You may need an appropriate loader to handle this file type.In the present webpack config file, we have:
rules: [ { test: /src\/.*\.jsx?$/, loaders: [ 'babel-loader', ], exclude: /node_modules/, }, ],

I changed test key value to /\.(js|jsx)$/ and it worked. However, I am not able to run the application on my local machine and for that I installed webpack-dev-server in my devDependency but when I wanted to Sign In, it showed Error: 503.

I know I am quite disturbing 😅 , but if possible, kindly help me figuring this out

@or-else
Copy link
Contributor

or-else commented Feb 20, 2019

I found out that @babel/core and @babel.preset-env modules are outdated and need to be updated for development purpose.

babel-core is specified as ^7.2.2 which is just 2 months old. The other babel stuff is also roughly the same. I would not call that outdated.

webpack.config.js that test key has value which does not allow npm to transpile .js files (like index.js)

Strange. I don't see any errors. I've changed the line to test: /src\/.*\.(js|jsx)?$/, recompiled and there was no difference.

I changed test key value to /\.(js|jsx)$/ and it worked. However, I am not able to run the application on my local machine and for that I installed webpack-dev-server in my devDependency but when I wanted to Sign In, it showed Error: 503.

The app is just a client. It won't work without the server: https://github.com/tinode/chat

@singhrohan62
Copy link
Author

singhrohan62 commented Feb 20, 2019

Strange. I don't see any errors. I've changed the line to test: /src\/.*\.(js|jsx)?$/, recompiled and there was no difference.

Actually, you can check that right now in the webpack.config.js file, test key has value /src\/.*\.jsx?$/

@or-else
Copy link
Contributor

or-else commented Feb 20, 2019

I compile it multiple times every day. I see no issues. I use exactly the same code you have on github.

@singhrohan62
Copy link
Author

I don't know why it showed this on my local PC:
screenshot 6
and when I changed its value to ./\(js|jsx)$/ it worked.That is why I said that the value should be changed. Nonetheless, I will continue on working #30

@or-else
Copy link
Contributor

or-else commented Feb 21, 2019

No errors here:

 $ npm run build:dev

> tinode-webapp@0.15.13-rc2 build:dev /Users/gene/ventures/tinode/webapp
> webpack --mode development --output ./umd/index.dev.js

Hash: 4eed30561640cbe75527
Version: webpack 4.29.3
Time: 4188ms
Built at: 2019-02-21 09:13:09
           Asset     Size  Chunks                    Chunk Names
    index.dev.js  541 KiB    main  [emitted]  [big]  main
index.dev.js.map  513 KiB    main  [emitted]         main
Entrypoint main [big] = index.dev.js index.dev.js.map
[0] multi ./src/index.js 28 bytes {main} [built]
[../tinode-js/umd/tinode.prod.js] 50.2 KiB {main} [built]
[./src/config.js] 717 bytes {main} [built]
[./src/index.js] 941 bytes {main} [built]
[./src/lib/blob-helpers.js] 5.73 KiB {main} [built]
[./src/lib/host-name.js] 1.1 KiB {main} [built]
[./src/lib/local-storage.js] 1.48 KiB {main} [built]
[./src/lib/navigation.js] 2.83 KiB {main} [built]
[./src/lib/utils.js] 1.22 KiB {main} [built]
[./src/messages.json] 11.2 KiB {main} [built]
[./src/views/info-view.jsx] 26.3 KiB {main} [built]
[./src/views/tinode-web.jsx] 51.7 KiB {main} [built]
[react] external "React" 42 bytes {main} [built]
[react-dom] external "ReactDOM" 42 bytes {main} [built]
[react-intl] external "ReactIntl" 42 bytes {main} [built]
    + 52 hidden modules

I'm using webpack 4.29.3 vs 4.23.1 in your case. Maybe that the reason.

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