compilation failing with files not found
Chuvisco88 opened this issue · 2 comments
I'm submitting a ... (check one with "x")
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
Current behavior
IMPORTANT: @ngx-meta/core version 2.0.1
When compilation is run, it throws an error that a file could not be found when resolving the module
resolve '@ngx-meta/core/index' in 'compiled/src/app'
Parsed request is a module
using description file: package.json (relative path: ./compiled/src/app)
Field 'browser' doesn't contain a valid alias configuration
after using description file: package.json (relative path: ./compiled/src/app)
resolve as module
looking for modules in node_modules
using description file: package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: package.json (relative path: ./node_modules)
using description file: node_modules/@ngx-meta/core/package.json (relative path: ./index)
no extension
Field 'browser' doesn't contain a valid alias configuration
node_modules/@ngx-meta/core/index doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
node_modules/@ngx-meta/core/index.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
node_modules/@ngx-meta/core/index.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
node_modules/@ngx-meta/core/index.json doesn't exist
as directory
node_modules/@ngx-meta/core/index doesn't exist
I tried and added the file from this repository to the node_modules folder, it worked until it didn't find another file node_modules/@ngx-meta/core/src/meta.helper
.
So I added it as well, tried again until I have added all the missing files.
I am wondering why those are not published in the npm package?
Expected/desired behavior
The compiler should find the respective file(s) and compile the project.
Therefore the files needs to be in the npm package.
Minimal reproduction of the problem with instructions
Run npm install --save @ngx-meta/core@2.0.1
The installed node_module does not contain code files, only definition files.
What is the motivation / use case for changing the behavior?
The project previously used @nglibs/meta but couldn't find the repo anymore as it was renamed. So I wanted to point to the renamed repository, which now let's the build fail.
Environment
-
Angular version: 2.4.6
Did not check if it is still a problem with Angular 5, as this would be a lot of work to update the whole project to all the new versions. -
Browser:
- Chrome (desktop) version XX
- Chrome (Android) version XX
- Chrome (iOS) version XX
- Firefox version XX
- Safari (desktop) version XX
- Safari (iOS) version XX
- IE version XX
- Edge version XX
- For Tooling issues:
- Node version: v8.6.0
- Platform: Mac
@Chuvisco88 i see what the problem exactly is, that's all about we had to change the build system after Angular team forced all libs to do so, and as a drawback projects with Angular <4 are suffering.
Did you try to download the latest package of @ngx-meta/core
to an empty project and copy those files from there, to your app's node_modules
directory?
We found an easy fix by using git instead of the npm module:
"ngx-meta": "git+https://github.com/fulls1z3/ngx-meta.git#v2.0.1",
That worked as it clones the repo in the node_module folder