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

fresh setup - error #216

Closed
themodernpk opened this issue Jul 23, 2016 · 22 comments
Closed

fresh setup - error #216

themodernpk opened this issue Jul 23, 2016 · 22 comments

Comments

@themodernpk
Copy link

I have done a fresh setup and when I run "npm run dev", i receive following error:

F:\node\adonis\aclApp>npm run dev

adonis-app@3.0.0 dev F:\node\adonis\aclApp
nodemon --watch app --watch bootstrap --watch config --watch .env -x 'node --harmony
_proxies' server.js

[nodemon] 1.9.2
[nodemon] to restart at any time, enter rs
[nodemon] watching: F:\node\adonis\aclApp\app//* F:\node\adonis\aclApp\bootstrap//

  • F:\node\adonis\aclApp\config/*/ .env
    [nodemon] starting 'node --harmony_proxies' server.js
    ''node' is not recognized as an internal or external command,
    operable program or batch file.
    [nodemon] app crashed - waiting for file changes before starting...

    While node in command prompt working fine
@RomainLanz
Copy link
Member

Hi @webreinvent!

Please take a look at #141 (comment).

@themodernpk
Copy link
Author

it is not working on windows 10. Can you suggest anything else?

@RomainLanz
Copy link
Member

RomainLanz commented Jul 23, 2016

Oh, if you are using Windows 10 could you please run the command adonis fix inside your project directory.

@themodernpk
Copy link
Author

Tried still same error. I really wanted to give this framework a try, seems like I need to switch back to sails
:(

@RomainLanz
Copy link
Member

On which version of npm are you running?

@themodernpk
Copy link
Author

it's v 2.15.1

@RomainLanz
Copy link
Member

RomainLanz commented Jul 23, 2016

As you can see on the website you don't fit the requirement version for npm.

  • Node.js should be version 4.0 or greater.
  • npm should be version 3.0 or greater.

@thetutlage
Copy link
Member

@webreinvent I would suggest you to follow installation docs http://adonisjs.com/docs/3.0/installation and make sure you have minimal required versions of node and npm

@themodernpk
Copy link
Author

upgraded to Node v4.4.4 & npm v3.10.5, create a new project. If I type "npm run dev" I am still getting same error but if I type "npm start", it seems working fine.

Tried "adonis fix" but no success.

Thanks for the support so far, at least I can try the framework with npm start.

@thetutlage
Copy link
Member

thetutlage commented Jul 23, 2016

@webreinvent Replace dev script inside package.jsonfile with. nodemon --watch app --watch bootstrap --watch config --watch .env -x \"node --harmony_proxies\" server.js

I have fixed same in the repo too 😄

@themodernpk
Copy link
Author

this seem working 👍

@themodernpk
Copy link
Author

I am again facing similar issues after upgrading node and npm:

node -v
v6.5.0

npm -v
3.10.3

Error:

"C:\Program Files (x86)\JetBrains\WebStorm 2016.2.2\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" run-script dev

> adonis-app@3.0.0 dev F:\node\adonis\niddar
> nodemon --watch app --watch bootstrap --watch config --watch .env -x "node --harmony_proxies" server.js

[nodemon] 1.10.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: F:\node\adonis\niddar\app/**/* F:\node\adonis\niddar\bootstrap/**/* F:\node\adonis\niddar\config/**/* .env
[nodemon] starting `node --harmony_proxies server.js`
node: bad option: --harmony_proxies
[nodemon] app crashed - waiting for file changes before starting...

@themodernpk themodernpk reopened this Sep 8, 2016
@thetutlage
Copy link
Member

You just have to look into the error thrown by the node. node: bad option: --harmony_proxies.

For now you have to remove --harmony_proxies flag from the start or dev script.

It is a issue with the Node.js v6.5 and they are patching it nodejs/node#8445

@themodernpk
Copy link
Author

on previous node version __dirname+'../../providers/Niddar/NiddarProvider', this properly loading the service provider but now it does not:

Error: Cannot find module 'F:\node\adonis\niddar\bootstrap../../providers/Niddar/NiddarProvider' any idea?

@thetutlage
Copy link
Member

It is never recommended to construct paths like this and you should always use the path module.

path.join(__dirname, '../../providers/Niddar/NiddarProvider')

@themodernpk
Copy link
Author

@thetutlage I am very impressed with the support and the framework too. Let me know if I can contribute by any means, I own a web agency here in India, known as WebReinvent

@ibandominguez
Copy link

I am using node v6.5.0 and npm v3.10.3 on Macos 10.11.06 (El Capitán), I have removed "--harmony_proxies" from the dev script located in the project package.json and it works great

@rizwanmcs
Copy link

i new user to adonis.js framework
i configure the new project in adonis.js framework and when i run my server i get the follwoing error
"Error (500) Copy to clipboard
Cannot find module 'formidable"
"pen: module.js
Unable to locate file source."

here is my route
const Route = use('Route')
Route.get('/', 'HomeController.home')

this is my controller
class HomeController {

  • home (request, response) {
    const view = yield response.view('welcome')
    response.send(view)
    }

}

and this is my nodejs information
SERVER_SOFTWARE : NodeJS 4.4.0 Linux

@thetutlage
Copy link
Member

what's the npm version

@rizwanmcs
Copy link

npm version is "2.14.20"

@thetutlage
Copy link
Member

It needs to be 3 or greater

@lock
Copy link

lock bot commented Mar 11, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants