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.

Module cannot be found after installing package 'ts-odatajs' in clean project

See original GitHub issue

Just a little comment to my report:

I have just upgraded my angular 5.2 application to angular 6. In the angular 5 application i did not see this error. So after i have been struggling with this issue for some time and since i could easily reproduce it in a clean new angular 6 solution, then I decided to submit this report 😃

- [ X] bug report 
- [ ] feature request
- [ ] new
- [X ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Windows 10 Pro Node version: 8.9.3 NPM version: 5.5.1 Angular CLI version Angular CLI: 6.1.2 Node: 8.9.3 OS: win32 x64 Angular: @angular-devkit/architect 0.7.2 @angular-devkit/core 0.7.2 @angular-devkit/schematics 0.7.2 @schematics/angular 0.7.2 @schematics/update 0.7.2 rxjs 6.2.2 typescript 2.7.2

Repro steps

  1. ng new angularTest
  2. cd angularTest
  3. npm i ts-odatajs
  4. go to for example app.component.ts and make it contain the following:
import { Component } from '@angular/core';
import {oData} from 'ts-odatajs';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'angularTest';
  oData;

  constructor(){
    oData.json
  }
}

The log given by the failure

ERROR in ./node_modules/ts-odatajs/lib/odata/net.js Module not found: Error: Can’t resolve ‘http’ in ‘C:\Users\USER\Desktop\testDir\angularTest\node_modules\ts-odatajs\lib\odata’ ERROR in ./node_modules/ts-odatajs/lib/odata/net.js Module not found: Error: Can’t resolve ‘https’ in ‘C:\Users\USER\Desktop\testDir\angularTest\node_modules\ts-odatajs\lib\odata’

Desired functionality

Result: A successfull build

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
steffelicommented, Aug 9, 2018

Similar or duplicate issue here maybe? https://github.com/angular/angular-cli/issues/10694 We struggle with the same thing.

0reactions
angular-automatic-lock-bot[bot]commented, Oct 3, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Unable to import a module that is definitely installed
In my case, it is permission problem. The package was somehow installed with root rw permission only, other user just cannot rw to...
Read more >
How to clean node modules folder of packages that are not in ...
Assume I install project packages with npm install that looks into package.json for modules to be installed. After a while I see that...
Read more >
Getting Started — Spack 0.20.0.dev0 documentation
Spack uses clingo under the hood to resolve optimal versions and variants of dependencies when installing a package. Since clingo itself is a...
Read more >
Drupal Clean Package Composer Plugin
Removes the unnecessary files for the specific package based on the given rules. Be careful: This plugin removes packages files.
Read more >
Downloading and Installing Packages | CADS - Miami University
Install a Python package. pip - (0:23); Install libraries, packages, and modules within Spyder - (0:50) ...
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