Hi,
I’ve had major problem trying to install nearly everything in chapter7 concerning the front end fun with sass, gulp and bootstrap 4.
Apologies if some of this appears to be duplicated. This is because I have tried installing this multiple times.
Libsass wasn’t a problem and installation was a breeze up until the point of installing gulp.
npm install -g --save-dev gulp-sass gulp-concat gulp-rename
This gave the warning:-
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
which led on to this bunch of errors:-
npm ERR! Linux 4.15.0-55-generic
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install” “-g” “–save-dev” “gulp-sass” “gulp-concat” “gulp-rename”
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! { Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib/node_modules’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/david/projects/boat/npm-debug.log
I then ran the same with elevated privileges, which seemed to correct the issues.
After this came the line “npm install --save-dev gulp” where it complained that this should be run globally with the -g switch. Also, I could see that it was also going to have permissions problems with usr/local/…
So I ran this with “sudo npm install -g --save-dev gulp” instead.
Then it came to running gulp I could not solve it despite looking on google and :-
(venv) david@david-VirtualBox:~/projects/boat$ gulp
assert.js:42
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/home/david/projects/boat/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/home/david/projects/boat/node_modules/undertaker/lib/task.js:13:8)
at Object. (/home/david/projects/boat/gulpfile.js:43:6)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
(venv) david@david-VirtualBox:~/projects/boat$ sudo gulp
assert.js:42
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/home/david/projects/boat/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/home/david/projects/boat/node_modules/undertaker/lib/task.js:13:8)
at Object. (/home/david/projects/boat/gulpfile.js:43:6)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
I even tried the method for installing this at this link https://tecadmin.net/install-gulp-js-on-ubuntu/ but this still gave the permissions problem:-
(venv) david@david-VirtualBox:~/projects/boat$ npm install -g gulp
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/lib/node_modules’
npm ERR! { [Error: EACCES: permission denied, access ‘/usr/lib/node_modules’]
npm ERR! stack:
npm ERR! ‘Error: EACCES: permission denied, access ‘/usr/lib/node_modules’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/lib/node_modules’ }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/david/.npm/_logs/2019-08-31T00_54_49_258Z-debug.log
I give up otherwise I will end up with a broken system. I think I will go down the manual route of adding bootstrap, unless anyone has a solution to this problem…
Dave Johns