lwsjs / local-web-server

A lean, modular web server for rapid full-stack development.
MIT License
1.2k stars 85 forks source link

function error #125

Closed omerakgoz34 closed 4 years ago

omerakgoz34 commented 4 years ago

it always gives me this error even though I installed it for the first time:

TypeError: argument fn must be a function at Function.wrapfunction [as function] (C:\Users\omerakgoz34\scoop\persist\nodejs\bin\node_modules\local-web-server\node_modules\depd\index.js:399:11) at populateConstructorExports (C:\Users\omerakgoz34\scoop\persist\nodejs\bin\node_modules\local-web-server\node_modules\http-errors\index.js:264:45) at Object. (C:\Users\omerakgoz34\scoop\persist\nodejs\bin\node_modules\local-web-server\node_modules\http-errors\index.js:30:1) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:643:32) at Function.Module._load (internal/modules/cjs/loader.js:556:12) at Module.require (internal/modules/cjs/loader.js:683:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (C:\Users\omerakgoz34\scoop\persist\nodejs\bin\node_modules\local-web-server\node_modules\raw-body\index.js:16:19)

75lb commented 4 years ago

there is not enough information here.. it always you that error when? With what config? Which node version? Which OS? Please post a reproduction case - instructions i can follow to reproduce your issue.

omerakgoz34 commented 4 years ago

@75lb

Win10 v1903 original nodejs v12.6.0 npm@6.10.0 No config, setting etc... I just typed "ws" and boom! error :( I've never seen this error before

75lb commented 4 years ago

i just did a clean install of local-web-server on Windows 10 and ran ws and it worked correctly. Could you try reinstalling please?

omerakgoz34 commented 4 years ago

There may be an incompatibility with the new version(v1903) of windows. Because it working on android :/ I've already just clean installed windows. I installed lws after installing Windows but it gave error: //

:(

75lb commented 4 years ago

try this solution: https://github.com/facebook/create-react-app/issues/7315#issuecomment-508271732

75lb commented 4 years ago

also, this post says it is a node v12 issue: https://stackoverflow.com/questions/56859092/why-does-the-typeerror-argument-fn-must-be-a-function-error-occur-when-runnin

closing as it's not a bug in local-web-server.

omerakgoz34 commented 4 years ago

Thanx :)

75lb commented 4 years ago

you're welcome, let me know if you find anything else.

ahmetozcelik commented 4 years ago

There is a similar problem with using gulp. I solved problem. I found to solution character encoding. Pc language turkish. Vscode editor character encoding UTF-8 and CRLF. I changed to settings ISO 8859-9 and LF. It's working.

omerakgoz34 commented 4 years ago

There is a similar problem with using gulp. I solved problem. I found to solution character encoding. Pc language turkish. Vscode editor character encoding UTF-8 and CRLF. I changed to settings ISO 8859-9 and LF. It's working.

Thanx(teşekkürler) ;)

omerakgoz34 commented 4 years ago

There is a similar problem with using gulp. I solved problem. I found to solution character encoding. Pc language turkish. Vscode editor character encoding UTF-8 and CRLF. I changed to settings ISO 8859-9 and LF. It's working.

Bu hata v12.6'ya aitmiş. v12.4'de çalışıyor ve bu hatadan dolayı da Electron ve birçok linux dağıtımları v12.4'de bekliyor.

ahmetozcelik commented 4 years ago

There is a similar problem with using gulp. I solved problem. I found to solution character encoding. Pc language turkish. Vscode editor character encoding UTF-8 and CRLF. I changed to settings ISO 8859-9 and LF. It's working.

Bu hata v12.6'ya aitmiş. v12.4'de çalışıyor ve bu hatadan dolayı da Electron ve birçok linux dağıtımları v12.4'de bekliyor.

Kaynak veya issue var mı? İs there a source or opened issue?

omerakgoz34 commented 4 years ago

@ahmetozcelik

opened issue bulamadım ama toplumda çoğu kişi öyle söylüyor. Bende 12.6 ve 12.8 denedim çalışmadı, sonra 12.4 yükledim çalıştı. 10.6 LTS sürümünde de çalışıyordu.

I couldn't find error report but most people in society say so. I tried 12.6 and 12.8 but it did not work, then I installed 12.4 and 10.6 it's work. (cümle biraz garip oldu ama neyse xd)