generator-spfx
generator-spfx copied to clipboard
v1.9.0 React Library issue
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'
Thanks for reporting this issue. I am currently investigating this issue because it seems to be related to the @microsoft/generator-sharepoint
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.)
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
Any update on this issue? I noticed that the referenced issue from sp-dev-docs has been closed.
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 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.