Gillardo / ngx-bootstrap-datetime-popup

Date and time picker using ngx-bootstrap library
MIT License
31 stars 14 forks source link

Issue with contents of npm package for v7.0.0 #62

Closed jethas-bennettjones closed 2 years ago

jethas-bennettjones commented 2 years ago

Hi @Gillardo,

Thanks for pushing out v7. I noticed, though, that the contents is of the main folder and not of the dist folder, which is what I was expecting. Would you be able to republish this, but with the contents of the dist folder only?

Gillardo commented 2 years ago

I will have a look later today for you

Gillardo commented 2 years ago

it seems that the changes made by the PR have broken the publishing... the files in package.json like "main", "module" dont exist

jethas-bennettjones commented 2 years ago

I'm not sure what to say about this as I've never needed to set these properties up, even for a full Angular application. I've created a new branch that fixes a compilation issue, but when I run this command it gets all the way to publishing to npm before failing:

npm run build -- --configuration production
cd dist
npm publish
Gillardo commented 2 years ago

You cant publish to npm as you are not the owner

Also when builiding, its not doing partial mode image

Gillardo commented 2 years ago

I have changed the code and published to npm version 7.0.1

Can you see if this is now right for me please?

jethas-bennettjones commented 2 years ago

You cant publish to npm as you are not the owner

Also when builiding, its not doing partial mode image

Yes, that makes sense. I just wanted to make sure that we were both following the same commands up until publishinging. I had changed the compilation mode in my PR. Have you tried it after merging that in?

Gillardo commented 2 years ago

i run the command npm run build which isnt setting the configuration. I have now set a "default" configuration when running the build command, so that should sort it.

Did it work when you download via npm now?

jethas-bennettjones commented 2 years ago

Hi @Gillardo. Thanks for sorting that out, though I think there's still an issue with the wrong directory being packaged. Here is a screenshot of the package I build from the dist folder that contains the module folders at the top level, and works as expected: image And here is the contents of v7.0.1 found on npmjs.org, where you can see that all of the module folders are one level deeper: image

I think that, if you run npm publish from the dist folder after the package is built, that should sort this out.

Gillardo commented 2 years ago

Please try again.

The reason the error was occuring is that in this change, the version number was removed. This is needed for npm packaging

https://github.com/Gillardo/ngx-bootstrap-datetime-popup/commit/7dfb77333e950a89473cc60fc5a1d0b3197dca52#diff-a79278fd3642e896ac2cc5d77d4be16dae1270fc660a87a5e383f588b32bab24

Can you have a look now please. I have also added a npm script for publishing to npm as its been a while for me as well lol

jethas-bennettjones commented 2 years ago

Thanks for updating this. The package structure looks good. I'll test it out today and log a ticket if I'm still having issues.