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

npm start? #6

Open
MuzamilJani opened this issue Jul 9, 2018 · 6 comments
Open

npm start? #6

MuzamilJani opened this issue Jul 9, 2018 · 6 comments

Comments

@MuzamilJani
Copy link

issue #1
added 608 packages from 382 contributors and audited 2374 packages in 30.09s
found 11 vulnerabilities (3 low, 4 moderate, 4 high)
run npm audit fix to fix them, or npm audit for details
issue #2
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: gulp
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/muzamil/.npm/_logs/2018-07-09T14_47_48_952Z-debug.log

@ramonrey
Copy link

I'm having the same problems. Any fix yet?

@Phakama
Copy link

Phakama commented Oct 18, 2018

I'm also experiencing the same issue. Has anyone got the solution?

@thepenguinthatwants
Copy link

still same

@syedshaon
Copy link

syedshaon commented Sep 12, 2019

Here is the setup for gulp 4
// package.json
{
"name": "bs4starter",
"version": "1.0.0",
"description": "Bootstrap 4 workflow",
"main": "index.js",
"scripts": {
"start": "gulp"
},
"author": "Mashiur",
"license": "MIT",
"dependencies": {
"bootstrap": "^4.3.1",
"font-awesome": "^4.7.0",
"jquery": "^3.4.1",
"popper.js": "^1.15.0"
},
"devDependencies": {
"browser-sync": "^2.26.7",
"gulp": "^4.0.2",
"gulp-sass": "^4.0.2"
}
}

// gulpfile.js

const gulp = require('gulp');
const browserSync = require('browser-sync').create();
const sass = require('gulp-sass');

// Compile Sass & Inject Into Browser
function sassify() {
return gulp.src(['node_modules/bootstrap/scss/bootstrap.scss', 'src/scss/*.scss'])
.pipe(sass())
.pipe(gulp.dest("src/css"))
.pipe(browserSync.stream());
};

// Move JS Files to src/js
function js() {
return gulp.src(['node_modules/bootstrap/dist/js/bootstrap.min.js', 'node_modules/jquery/dist/jquery.min.js', 'node_modules/popper.js/dist/umd/popper.min.js'])
.pipe(gulp.dest("src/js"))
.pipe(browserSync.stream());
};

// Watch Sass & Serve
function serve() {

browserSync.init({
    // open: 'external',
    // proxy: 'http://localhost/site19/bs4starter/src/',
    // port: 8019,
    server: "./src"
});

gulp.watch('node_modules/bootstrap/scss/bootstrap.scss', sassify);
gulp.watch('src/scss/*.scss', sassify);
gulp.watch("src/*.html").on('change', browserSync.reload);

};

// Move Fonts to src/fonts
function fonts() {
return gulp.src('node_modules/font-awesome/fonts/*')
.pipe(gulp.dest('src/fonts'));
};

// Move Font Awesome CSS to src/css
function fa() {
return gulp.src('node_modules/font-awesome/css/font-awesome.min.css')
.pipe(gulp.dest('src/css'));
};
exports.sassify = sassify;
exports.js = js;
exports.serve = serve;
exports.fa = fa;
exports.fonts = fonts;
gulp.task('default', gulp.series(sassify, js, fonts, fa, serve));
bs4starter.zip

@ghost
Copy link

ghost commented Apr 14, 2020

When running $ npm run start. I get this.

> gulp

internal/modules/cjs/loader.js:797
    throw err;
    ^

Error: Cannot find module 'gulp-cli'
Require stack:
- /home/.../bs4starter/node_modules/.bin/gulp
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/.../bs4starter/node_modules/.bin/gulp:3:1)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/.../bs4starter/node_modules/.bin/gulp' ]

Installing gulp-cli locally fixes the issue.

.../bs4starter$ npm install gulp-cli --save-dev

@Philippaolomoro
Copy link

I am having the same issues.

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

6 participants