generator-starter | Yeoman Website Starter Generator | Generator Utils library
kandi X-RAY | generator-starter Summary
kandi X-RAY | generator-starter Summary
A very simple yeoman generator to kickstart websites.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of generator-starter
generator-starter Key Features
generator-starter Examples and Code Snippets
Community Discussions
Trending Discussions on generator-starter
QUESTION
I am aware of the other questions about this issue. The answers on them are of no help, however. I've been dealing with Node and npm for a few years and I've never come across something so confusing. This is my first time dealing with socket.io, however.
I've installed socket.io
as a dependency on a git submodule of my project:
ANSWER
Answered 2020-Nov-09 at 18:06Disclaimer: It's impossible for me to reproduce your error given that a) I'm on Mac, b) I don't have Photoshop and c) I didn't watch the video tutorial. Still, if you bare with me, I'm pretty sure the following will hint you in the proper direction.
The error you are getting is not actually related to socket.io or engine.io. Any dependency that you would declare from your plugin (and that it is not already a dependency of the generator) would trigger the same issue.
The problem is essentially that your plugin's node_modules
directory is not actually used for dependency resolution. I'd expect that you can confirm this by adding something like console.log(require.paths)
at the top of your plugin's source file.
Then why is it not used? Because generator
hijack modules resolutions to disallow loading dependencies from outside of your plugin's node_modules
(see Generator's main file: app.js). Note that this is a recent change (July 15, 2020) which explains why the setup you use may work in the tutorial but no longer works.
Now, I'm not sure exactly what's wrong with generator's patched module resolution. Apparently, it doesn't support symlinked plugins directories, but then again, I don't think this is your case. Could it be that some of your dependency may have been hoisted to a parent node_module
directory? Another thing is that the construction of safe paths seems to include the "plugins" folder itself (rather than the directory of a specific plugin)... Could be a problem.
Anyway, at this point, I suggest that you 1) try downgrading generator-core's source to tag 3.12.0, 2) if it works, open a ticket on generator-core's bug tracker, then 3) revert generator-core to currently version (this is a security fix, so you should not ignore it) and try to work out a solution.
QUESTION
I'm trying to make a simple Yeoman generator in ES6.
I think I followed the documentation.
After $npm link
in the current folder of my generator i go in another directory and try :
ANSWER
Answered 2017-Apr-26 at 15:26Your generator is not exporting a standard node module. See this line https://github.com/ethyde/generator-starterpack/blob/master/generators/app/index.js#L77
Babel by default compile es6 module files to exports.defaults
. Yeoman expects a usual Node.js export. In other words, it expects your generator to be exported as module.exports = Generator
.
You'll need to update your babel configuration.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install generator-starter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page