mbasso / react-decoration

A collection of decorators for React Components
MIT License
631 stars 24 forks source link

Missing /lib folder - Unable to use the package #5

Closed igghera closed 7 years ago

igghera commented 7 years ago

General Information

Description

I have installed the package in my project. At first Atom was complaining that it couldn't find the module:

screen shot 2016-11-14 at 12 33 51

That's probably because the "main" field in the package.json file is set to "lib/index.js", but there's no lib folder in the project. Looking at the npm scripts I found the build script, that should generate the lib folder, but I'm not sure when that's supposed to happen. Maybe as a postinstall script?

Steps to reproduce

Install the package via npm install and import one of the decorators in a project.

Versions

mbasso commented 7 years ago

Hi, I've tried to install react-decoration@1.4.0 but I've not been able to reproduce this issue. Can you try to install it again with npm install --save react-decoration? Install also its peer dependency react-addons-perf: npm install --save-dev react-addons-perf

igghera commented 7 years ago

Hey Matteo,

thanks for the quick reply :)

I have tried installing react-addons-perf as well, but the result is the same. Basically the lib folder is missing. Do you have any idea why it could be missing?

Oh, I forgot to mention: these decorators are great, I love the idea. Thanks for it!

mbasso commented 7 years ago

Thank you, I'm glad you like it :)

Unfortunately, I have no ideas at the moment. As you can see here, npm run build creates lib folder that is published to npm. It seems working fine here. I have also tried to install it in a project. Can you please run the following and copy/paste the output here?

npm uninstall react-decoration
npm install --save react-decoration@latest
igghera commented 7 years ago

This is the output

$ npm install --save react-decoration@latest
opa@0.1.0 /Users/andrea/dev/opa
└─┬ react-decoration@1.4.0
  └── autobind-decorator@1.3.3

By the way I can survive without the decorators, it's not a matter of life or death. I just liked them so much, especially the autobind one!

Also, I'm italian so if you prefer we can switch to that language :)

mbasso commented 7 years ago

I'd like to switch language, but I think that we should continue this conversation in english, in this way other contributors might help us.

I think that we can delete node_modules folder and then try:

npm cache clean
npm install --save react-decoration@latest

If the error persists can you try to install react-decoration@1.3.0? I'm sure that this release works well, so we can determine that is a problem related to a specific version of npm/node.

Can you please provide the following?

If you are using a boilerplate, please, provide also its link

mbasso commented 7 years ago

@igghera Do you have any news about this issue?

mbasso commented 7 years ago

I’m closing this issue because it has been inactive for a few weeks. Please reopen if you still encounter this issue :)

Thank you!