angular-seed icon indicating copy to clipboard operation
angular-seed copied to clipboard

npm start, npm run build.dev and npm run build.prod resulting in error which states gulp is missing.

Open jaggukaka opened this issue 10 years ago • 3 comments

Hi, I have followed instructions on the git repo home, pulled the project and tried to start. But it always fails with error (while executing npm start, npm run build.dev and npm run build.prod), pasted at the end. When I checked in node_modules folder, gulp is present and properly installed.

I tried deleting the project, cloning again, npm cache clean followed by npm install. But no luck. I suspect the angular-cli which I had installed earlier is causing the issue? or is it the node version (v6.3.1) causing the issue?

Any help is greatly appreciated.

The error encountered is below

> [email protected] start <some_directory>/angular2-seed
> gulp serve.dev --color --config-env dev

[16:02:40] Requiring external module ts-node/register

<some_directory>/angular2-seed/node_modules/ts-node/src/index.ts:259
          throw new TSError(diagnosticList)
                ^
TSError: ⨯ Unable to compile TypeScript
gulpfile.ts (1,23): Cannot find module 'gulp'. (2307)
gulpfile.ts (2,23): Cannot find module 'gulp-util'. (2307)
gulpfile.ts (3,30): Cannot find module 'run-sequence'. (2307)
    at getOutput (<some_directory>/angular2-seed/node_modules/ts-node/src/index.ts:259:17)
    at <some_directory>/angular2-seed/node_modules/ts-node/src/index.ts:268:16
    at Object.compile (<some_directory>/angular2-seed/node_modules/ts-node/src/index.ts:405:17)
    at loader (<some_directory>/angular2-seed/node_modules/ts-node/src/index.ts:290:33)
    at Object.require.extensions.(anonymous function) [as .ts] (<some_directory>/angular2-seed/node_modules/ts-node/src/index.ts:307:14)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)

npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `gulp serve.dev --color --config-env dev`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'gulp serve.dev --color --config-env dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp serve.dev --color --config-env dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular2-seed
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular2-seed
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     <some_directory>/angular2-seed/npm-debug.log

jaggukaka avatar Aug 18 '16 10:08 jaggukaka

Similar issues were solved multiple ways in the past. Please, take a look here and let me know if any of the solutions works for you.

mgechev avatar Aug 19 '16 02:08 mgechev

@mgechev Thanks for pointing to those issues.I should have done some more search before creating an issue. Looks like it's working now without any issues. All I had to do is following.

git clone --depth 1 https://github.com/mgechev/angular2-seed.git
cd angular2-seed
npm run reinstall
npm start

I think the issue was the bad habit I have while installing node packages, I always install with sudo, may be that was causing the issue. :)

jaggukaka avatar Aug 19 '16 18:08 jaggukaka

Folks In case nothing worked, make sure your instance/droplet has 1 GB of ram at least. Or make a swapfile, like this: sudo fallocate -l 1G /swapfile sudo mkswap /swapfile sudo swapon /swapfilesudo swapon /swapfile

nadirali91 avatar Sep 20 '16 00:09 nadirali91