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 installing the webapp #81

Open
sbmueller opened this issue Apr 28, 2019 · 6 comments
Open

Issues with installing the webapp #81

sbmueller opened this issue Apr 28, 2019 · 6 comments

Comments

@sbmueller
Copy link

I'm stuck on lesson 2 chapter 12 of Intro to DevOps course.
When I do sudo npm install, I already get the following errors

> [email protected] install /home/vagrant/devops-kung/node_modules/grunt-sass/node_modules/node-sass
> node build.js


/home/vagrant/devops-kung/node_modules/grunt-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/src/node.js:120
exports.inspectOpts = Object.keys(process.env).filter(key => {
                                                           ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/vagrant/devops-kung/node_modules/grunt-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/src/index.js:9:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
npm ERR! Linux 4.4.0-142-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.10.48
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node build.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] install script 'node build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/devops-kung/npm-debug.log

Running the tests with grunt -v also yields errors, unlike in the video

/home/vagrant/devops-kung/node_modules/grunt-sass/tasks/sass.js:3
const util = require('util');
^^^^^
Loading "sass.js" tasks...ERROR
>> SyntaxError: Use of const in strict mode.
>>     at Module._compile (module.js:439:25)
>>     at Object.Module._extensions..js (module.js:474:10)
>>     at Module.load (module.js:356:32)
>>     at Function.Module._load (module.js:312:12)
>>     at Module.require (module.js:364:17)
>>     at require (module.js:380:17)
>>     at loadTask (/home/vagrant/devops-kung/node_modules/grunt/lib/grunt/task.js:323:10)
>>     at /home/vagrant/devops-kung/node_modules/grunt/lib/grunt/task.js:361:7
>>     at Array.forEach (native)
>>     at loadTasks (/home/vagrant/devops-kung/node_modules/grunt/lib/grunt/task.js:360:11)

Then I'm told to visit localhost:8080 on my browser, which just gives me a "403 Forbidden" screen. This does not seem intended. Please help so I can continue the course.

@13rac1
Copy link
Contributor

13rac1 commented Apr 29, 2019

The problem is upstream with the devops-kung project: https://github.com/chef/devops-kungfu and the issue should be filed there.

I suspect devops-kung only works with an older version of Node. Use nvm to install the required version.

  "engines": {
    "node": "~0.10.0"
  },

https://github.com/chef/devops-kungfu/blob/5f163466/package.json#L20-L22

@sbmueller
Copy link
Author

@13rac1 thanks for your answer. While the problem might be in devops-kungfu, I think the Udacity course should be adapted as well. The general problem is simply that when I follow the course instructions precisely, I get the error above. If there are additional steps necessary or configurations need to be changed, this should be incorporated in the Udacity course.

@sbmueller
Copy link
Author

Installing node 0.10.0 did not help.

@aviexk
Copy link

aviexk commented Sep 6, 2019

@sbmueller were you able to solve this? i'm having the same issue...

@sbmueller
Copy link
Author

See this thread in Udacity discussion forums:
https://discussions.udacity.com/t/error-with-sudo-npm-install/953996

@Jassi10000-zz
Copy link

Am also facing the same issue . is there any solution till date or not?

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