question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[x] Bug report [x] Feature request

Current behavior

There is no project in the folder. ng build -aot node_modules appears empty, you may need to run npm install Next, the user will run npm install. As a result: 1.

npm WARN saveError ENOENT: no such file or directory, open '../package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '../package.json'
npm WARN td No description
npm WARN td No repository field.
npm WARN td No README data
npm WARN td No license field.
  1. A file will be created package-lock.json. Which will be garbage.

Expected behavior

ng build -aot eg:

  1. node_modules not found, you need to create a project ng new <project name> or you may need to run npm install if the project already exists etc.
  2. node_modules not found
  3. node_modules appears empty

What is the motivation / use case for changing the behavior?

Avoid confusion and run an unnecessary command npm install. In this case

Environment

Angular CLI: 1.6.3, 1.7.4 etc.

For Tooling issues:

  • Node version: 8.9.4
  • Platform: Linux

Others: npm, debian 9.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hanslcommented, Apr 23, 2018

Hi @isopen,

It seems that our detection of a project is wrong. This seems like a real issue.

I think what @netstart was saying is that we don’t support - for long form arguments anymore. Which in your case doesn’t seem to be the issue, but please note that in a project -aot would not work as expected.

Cheers!

1reaction
netstartcommented, Apr 22, 2018

try ng build --aot

see ng help build

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ahead-of-time (AOT) compilation - Angular
The Angular ahead-of-time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the browser ......
Read more >
AngularCli build and server --aot vs --prod - Stack Overflow
The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase ...
Read more >
The Ahead-of-Time (AOT) compiler - Angular - w3resource
The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase ...
Read more >
Angular: Writing AoT-friendly applications | by David - Medium
ng build. The Angular CLI outputs the build artefacts in the dist folder ... However, with AoT compilation ( ng build --prod ),...
Read more >
What is AOT and JIT Compiler in Angular ? - GeeksforGeeks
You can run your app in JIT with this command: ng build OR ng serve. To run your app in AOT you have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found