I am trying to make a PR to ng2-pop-over package. First I wanted to make a trivial test by putting a console.log into ngOnInit to see if I am building and npm linking the package locally in the correct way, so I:
- forked and cloned the project.
- ran
npm i - ran
npm run build
And got a bunch of warnings as follow below.
⚠️ '@angular/common' is imported by dist/index.js, but could not be resolved – treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-external-dependency
⚠️ '@angular/core' is imported by dist/pop-over.component.js, but could not be resolved – treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-external-dependency
⚠️ 'rxjs/Rx' is imported by dist/pop-over.component.js, but could not be resolved – treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-external-dependency
⚠️ '@angular/core' is imported by dist/pop-over-trigger.directive.js, but could not be resolved – treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-external-dependency
⚠️ 'rxjs' is imported by dist/pop-over-trigger.directive.js, but could not be resolved – treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-external-dependency
⚠️ '@angular/core' is imported by dist/index.js, but could not be resolved – treating it as an external dependency
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-external-dependency
⚠️ No name was provided for external module 'rxjs/Rx' in options.globals – guessing 'rxjs_Rx'
⚠️ No name was provided for external module 'rxjs' in options.globals – guessing 'rxjs'
- since these were warning, I ignored them and did
npm link - back in my project I did
npm link ng2-pop-over - angular did not compile:
Failed to compile.
./~/ng2-pop-over/index.js
Module build failed: Error: ENOENT: no such file or directory, open '/Users/user1/Code/PopoverTest/node_modules/ng2-pop-over/index.js'
at Error (native)
@ ./src/app/app.module.ts 22:0-45
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
What am I doing wrong?