generator-spfx icon indicating copy to clipboard operation
generator-spfx copied to clipboard

v1.9.0 React Library issue

Open canbayraktar777 opened this issue 5 years ago • 6 comments

General Information

  • [x] Usage
  • [ ] Development
  • [ ] Documentation
  • [ ] Feature Request

Specific generator

  • [ ] Addons
  • [ ] HandlebarsJS

What Version you are running?

  • NodeJS: 10.16.3
  • NPM: 6.9.0
  • @pnp/spfx: 1.9.0

Selecting framework as ReactJS and creating library component gives the following error:

Error: ENOENT: no such file or directory, scandir 'C:\Users\can.bayraktar\AppData\Roaming\nvm\v10.16.3\node_modules@pnp\generator-spfx\node_modules@microsoft\generator-sharepoint\lib\generators\library\templates\react'

canbayraktar777 avatar Aug 28 '19 14:08 canbayraktar777

Thanks for reporting this issue. I am currently investigating this issue because it seems to be related to the @microsoft/generator-sharepoint

StfBauer avatar Aug 28 '19 20:08 StfBauer

FYI, --plusbeta with spfx generator (1.8.2-plusbeta) does not have this issue. However, does not add react dependency to package.json. (i am not 100% sure about the dependency though.)

canbayraktar777 avatar Aug 28 '19 20:08 canbayraktar777

Thank you for pointing out. To check that it is an unwanted behaviour I created an issue on sp-dev-docs. sp-dev-docs#4554

StfBauer avatar Aug 29 '19 10:08 StfBauer

Any update on this issue? I noticed that the referenced issue from sp-dev-docs has been closed.

joelfmrodrigues avatar Apr 20 '20 13:04 joelfmrodrigues

Based on the linked issue comments, I created a library component with "No Framework" and that seemed to have worked well. I wan't able to select the options related to React components, but at least it's something :)

joelfmrodrigues avatar Apr 20 '20 13:04 joelfmrodrigues

@joelfmrodrigues Not since the bug still exists in SPFx it is up to this generator to fix it. We are currently in the process to completely upgrade the Scaffolding behaviour of this generator.

Technically it is not supported to have a framework like mentioned in the other post, practical it is an exception that hasn't been caught. Mainly highlights in the PnP/SPFx generator or if you use command line parameters. Which to be honest no one uses.

StfBauer avatar Apr 20 '20 17:04 StfBauer