You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to generator-html-scss-js...
Error html-scss-js
Trying to copy from a source that does not exist: C:\Users\User\.node_modules\node_modules\generator-html-scss-js\generators\app\templates\package-lock.json
My index.js:
const Generator = require("yeoman-generator");
module.exports = class extends Generator {
welcome() {
this.log("Welcome to generator-html-scss-js...");
}
writing() {
this.fs.copy(
this.templatePath("index.html"),
this.destinationPath("index.html")
);
this.fs.copy(
this.templatePath("gulpfile.js"),
this.destinationPath("gulpfile.js")
);
this.fs.copy(
this.templatePath("_gitignore"),
this.destinationPath(".gitignore")
);
this.fs.copy(
this.templatePath("package.json"),
this.destinationPath("package.json")
);
this.fs.copy(
this.templatePath("package-lock.json"),
this.destinationPath("package-lock.json")
);
this.fs.copy(this.templatePath("app"), this.destinationPath("app"));
}
end() {
this.log(" ");
this.log(
"Finished generating! Before running, make sure you have the Gulp CLI installed globally, and you do NOT have Gulp itself installed globally."
);
this.log(" ");
this.log(
"Once you have the Gulp CLI installed globally, run Gulp to start your day :)) !"
);
this.log(" ");
}
};
Package.json in the templates folder
{
"name": "testing",
"version": "2.0.1",
"description": "This is for people who do web development with html, scss and js",
"main": "gulpfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Bryant Foo",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"autoprefixer": "^10.4.0",
"browser-sync": "^2.27.7",
"browserlist": "^1.0.1",
"cssnano": "^5.0.12",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-dart-sass": "^1.0.2",
"gulp-postcss": "^9.0.1",
"gulp-sass": "^5.0.0",
"gulp-terser": "^2.1.0",
"postcss": "^8.4.4",
"postcss-cli": "^9.0.2",
"sass": "^1.43.5"
}
}
Error i got:
My index.js:
Package.json in the templates folder
Package.json in the root folder:
When i run yo html-scss-js (my generator), the error occur. I don't see anything wrong with it.
The text was updated successfully, but these errors were encountered: