Skip to content

Adding angular-cli to existing project #2334

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

Closed
RodEsV opened this issue Sep 24, 2016 · 8 comments
Closed

Adding angular-cli to existing project #2334

RodEsV opened this issue Sep 24, 2016 · 8 comments

Comments

@RodEsV
Copy link

RodEsV commented Sep 24, 2016

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Linux ubuntu 4.2.0-42-generic #49-Ubuntu SMP Tue Jun 28 21:26:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

  1. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.15
    node: 6.3.1
    os: linux x64
  2. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

I made an app using angular rc 6 without angular-cli, I wrote some modules, and I was using Ng2Bs3Modal for managing modal bootstrap in angular, I changed some inserts in systemjs.config
in order to that worked!

  1. The log given by the failure. Normally this include a stack trace and some
    more information.

[email protected] start /home/rodesv/projects/FRONT/rusticstock
ng serve

EISDIR: illegal operation on a directory, read
Error: EISDIR: illegal operation on a directory, read
at Error (native)
at Object.fs.readSync (fs.js:731:19)
at tryReadSync (fs.js:486:20)
at Object.fs.readFileSync (fs.js:534:19)
at Object.getSource (/home/rodesv/projects/FRONT/rusticstock/node_modules/@angular-cli/ast-tools/src/ast-utils.js:25:45)
at findLoadChildren (/home/rodesv/projects/FRONT/rusticstock/node_modules/angular-cli/models/find-lazy-modules.js:8:30)
at /home/rodesv/projects/FRONT/rusticstock/node_modules/angular-cli/models/find-lazy-modules.js:46:9
at Array.forEach (native)
at Object.findLazyModules (/home/rodesv/projects/FRONT/rusticstock/node_modules/angular-cli/models/find-lazy-modules.js:45:10)
at Object.getWebpackCommonConfig (/home/rodesv/projects/FRONT/rusticstock/node_modules/angular-cli/models/webpack-build-common.js:18:43)
at new NgCliWebpackConfig (/home/rodesv/projects/FRONT/rusticstock/node_modules/angular-cli/models/webpack-config.js:13:30)
at Class.exports.default.Task.extend.run (/home/rodesv/projects/FRONT/rusticstock/node_modules/angular-cli/tasks/serve-webpack.js:19:22)
at /home/rodesv/projects/FRONT/rusticstock/node_modules/angular-cli/commands/serve.js:84:26
at process._tickCallback (internal/process/next_tick.js:103:7)

npm ERR! Linux 4.2.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v6.3.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: ng serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'ng serve'.
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 rustick-stock package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng serve
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs rustick-stock
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls rustick-stock
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/rodesv/projects/FRONT/rusticstock/npm-debug.log

  1. Mention any other details that might be useful.

Thanks! We'll be in touch soon.

@ghost
Copy link

ghost commented Sep 27, 2016

Why do you have a systemjs config when you're using the webpack version?

@RodEsV
Copy link
Author

RodEsV commented Sep 27, 2016

The last version comes with webpack!
I started it using systemjs and I'm not comfortable with webpack

@ghost
Copy link

ghost commented Sep 27, 2016

sorry but you should not use (or even can't use) systemjs with .beta-15, you'll need to downgrade to .beta-10

@RodEsV
Copy link
Author

RodEsV commented Sep 27, 2016 via email

@ghost
Copy link

ghost commented Sep 27, 2016

Github is not meant for support, but I can tell you that Webpack is blackboxed in Angular CLI, so you don't need to know how it works.
With the old systemjs version you had to update systemjs config; with the Webpack version you can't even change the config.
So, you don't need to learn much about webpack when using Angular CLI.

@RodEsV
Copy link
Author

RodEsV commented Sep 27, 2016 via email

@filipesilva
Copy link
Contributor

@rolandoldengarm advice is quite accurate. The CLI blackboxes a lot of things so mix-and-matching parts from different setups is not recommended.

My recomendation for transitioning a project into the CLI is to make a brand new project via ng new project-name, then copy your TS Angular application into src/.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants