core icon indicating copy to clipboard operation
core copied to clipboard

fresh setup - error

Open themodernpk opened this issue 10 years ago • 22 comments

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

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

[email protected] 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

themodernpk avatar Jul 23 '16 11:07 themodernpk

Hi @webreinvent!

Please take a look at https://github.com/adonisjs/adonis-framework/issues/141#issuecomment-232856315.

RomainLanz avatar Jul 23 '16 11:07 RomainLanz

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

themodernpk avatar Jul 23 '16 12:07 themodernpk

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

RomainLanz avatar Jul 23 '16 12:07 RomainLanz

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

themodernpk avatar Jul 23 '16 12:07 themodernpk

On which version of npm are you running?

RomainLanz avatar Jul 23 '16 12:07 RomainLanz

it's v 2.15.1

themodernpk avatar Jul 23 '16 12:07 themodernpk

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.

RomainLanz avatar Jul 23 '16 12:07 RomainLanz

@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

thetutlage avatar Jul 23 '16 13:07 thetutlage

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.

themodernpk avatar Jul 23 '16 13:07 themodernpk

@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 😄

thetutlage avatar Jul 23 '16 13:07 thetutlage

this seem working :+1:

themodernpk avatar Jul 23 '16 13:07 themodernpk

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

> [email protected] 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 avatar Sep 08 '16 19:09 themodernpk

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 https://github.com/nodejs/node/pull/8445

thetutlage avatar Sep 08 '16 19:09 thetutlage

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?

themodernpk avatar Sep 08 '16 19:09 themodernpk

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

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

thetutlage avatar Sep 08 '16 19:09 thetutlage

@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

themodernpk avatar Sep 08 '16 20:09 themodernpk

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

domingueznoda avatar Oct 01 '16 21:10 domingueznoda

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

rizwanmcs avatar Dec 20 '16 13:12 rizwanmcs

what's the npm version

thetutlage avatar Dec 20 '16 13:12 thetutlage

npm version is "2.14.20"

rizwanmcs avatar Dec 20 '16 13:12 rizwanmcs