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

Issues with npm run build #105

Closed
rdquintas opened this issue Jan 31, 2016 · 11 comments
Closed

Issues with npm run build #105

rdquintas opened this issue Jan 31, 2016 · 11 comments

Comments

@rdquintas
Copy link

Hi guys,
I'm struggling to build this app on my machine, and getting some build errors.
Can anyone help me, please.

This is what I have installed
node v5.5.0
npm v3.6.0

Not sure if I'm doing anything wrong.
See attached npm-debug.log
npm-debug.log.txt

Cheers

@rdquintas
Copy link
Author

Also have the same issue with npm start

@simonmcmanus
Copy link

what error do you get on an npm start?

@simonmcmanus
Copy link

I can't see anything obvious wrong.

It's worth deleting node_modules and doing a clean npm install.

@rdquintas
Copy link
Author

Thanks @simonmcmanus
I have solved the issue.

Changed package.json

from this

"scripts": {
    "test": "standard && mocha --recursive test",
    "update": "./bin/update-json.js",
    "build-markup": "./bin/build-markup.js",
    "start": "./bin/server.js",
    "build": "npm run update && npm run build-markup"
  },

to this

"scripts": {
    "test": "standard && mocha --recursive test",
    "update": "node ./bin/update-json.js",
    "build-markup": "node ./bin/build-markup.js",
    "start": "node ./bin/server.js",
    "build": "npm run update && npm run build-markup"
  },

As you can see above, all that I did was to pre-pend the command node to each script instruction.
Have no idea why it wasn't working without the "node" command.
Maybe because I'm running this on a windows machine.

Works like a charm now.

Cheers.

@iancrowther
Copy link
Member

What os?

@rdquintas
Copy link
Author

Windows 10

/Ricardo
www.ricardoquintas.com

On 31 Jan 2016, at 20:07, Ian Crowther notifications@github.com wrote:

What os?


Reply to this email directly or view it on GitHub.

@lnugbot
Copy link

lnugbot commented Jan 31, 2016

And how did you install? Installer, nvm or something similar? Helps us
build better apps in the future
On Sun, 31 Jan 2016 at 20:14, Ricardo Quintas notifications@github.com
wrote:

Windows 10

/Ricardo
www.ricardoquintas.com

On 31 Jan 2016, at 20:07, Ian Crowther notifications@github.com wrote:

What os?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#105 (comment)
.

@simonmcmanus
Copy link

Windows doesn't understand the

#!/usr/bin/env node

at the top of the scripts its running.

If you want to make a pull request we will get that merged in right away.

Thanks Ricardo

On 31 January 2016 at 18:56, Ricardo Quintas notifications@github.com
wrote:

Thanks @simonmcmanus https://github.com/simonmcmanus
I have solved the issue.

Changed package.json

from this

"scripts": {
"test": "standard && mocha --recursive test",
"update": "./bin/update-json.js",
"build-markup": "./bin/build-markup.js",
"start": "./bin/server.js",
"build": "npm run update && npm run build-markup"
},

to this

"scripts": {
"test": "standard && mocha --recursive test",
"update": "node ./bin/update-json.js",
"build-markup": "node ./bin/build-markup.js",
"start": "node ./bin/server.js",
"build": "npm run update && npm run build-markup"
},

As you can see above, all that I did was to pre-pend the command node
to each script insctrution.
Have no idea why it wasn't working without the "node" command.
Maybe because I'm running this on a windows machine.

Works like a charm now.

Cheers.


Reply to this email directly or view it on GitHub
#105 (comment)
.

Simon McManus

DotJS Ltd - Node Consultancy

@rdquintas
Copy link
Author

@lnugbot I have installed using installer

@simonmcmanus I see. So I can't use the shebang line I guess, when using Windows.
BTW, saw this interesting discussion on the subject here
http://stackoverflow.com/questions/33509816/what-exactly-does-usr-bin-env-node-do-at-the-beginning-of-node-files
Another alternative for me (without changing the package.json) would be to run the script directly without using npm, but instead for example

node bin/server

what do you suggest @simonmcmanus ?

@lnugbot
Copy link

lnugbot commented Feb 1, 2016

Adding the node to the start of the commands like in your example should be
fine. It will just mean windows knows how to handle the command.

Let me know if you have any questions

Sent from my iPhone

On 31 Jan 2016, at 20:56, Ricardo Quintas notifications@github.com wrote:

@lnugbot https://github.com/lnugbot I have installed using installer

@simonmcmanus https://github.com/simonmcmanus I see. So I can't use the
shebang line I guess, when using Windows.
BTW, saw this interesting discussion on the subject here
http://stackoverflow.com/questions/33509816/what-exactly-does-usr-bin-env-node-do-at-the-beginning-of-node-files
Another alternative for me (without changing the package.json) would be to
run the script directly without using npm, but instead for example

node bin/server

what do you suggest @simonmcmanus https://github.com/simonmcmanus ?


Reply to this email directly or view it on GitHub
#105 (comment).

@rdquintas
Copy link
Author

This issue can be closed.
All working fine.

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

4 participants