ng build -aot
See original GitHub issue[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.
- A file will be created package-lock.json. Which will be garbage.
Expected behavior
ng build -aot eg:
- node_modules not found, you need to create a project
ng new <project name>
or you may need to runnpm install
if the project already exists etc. - node_modules not found
- 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:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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!
try
ng build --aot
see
ng help build