project-error / pe-cli Goto Github PK
View Code? Open in Web Editor NEWA FiveM CLI tool to create Javascript/Typescript resources fast and simple.
A FiveM CLI tool to create Javascript/Typescript resources fast and simple.
{
language: { val: 'TypeScript' },
resourceName: { val: 'test-react' },
packages: { val: [] },
uiFramework: { val: 'react_typescript' }
}
The package.json which is being fetched from the template repository references the homepage as web/build
but the CLI uses the directory ui
and not web
.
homepage matches the folder structure of the generated boilerplate so that the UI can be rendered in-game.
homepage uses the wrong directory
I think that among with the pre-shown options there should be an input box for the user to input certain packages he would like to be implemented, separated by space or comma, what fits more. One way this would work is standalone, type the packages without selecting any option and it will install those packages, other way it could work is typing the packages AND select an option, that way it would install the option AND the specified packages ๐
Hey Guys, i have been using this for a while, i recently reinstalled windows and now when i try to run the command in terminal node gives me this error:
npm ERR! code ENOVERSIONS
npm ERR! No versions available for create-fivem-app
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\bluev\AppData\Local\npm-cache_logs\2021-06-15T18_40_31_219Z-debug.log
not sure what this means or what to do, appreciate the work you guys do <3
It would be nice if cli would also generate a .gitignore file for the new project.
{
language: { val: 'JavaScript' },
resourceName: { val: 'test' },
packages: { val: [ 'eslint', 'prettier' ] },
uiFramework: { val: 'react_typescript' }
}
./resources
directory with javascript files
./ui
directory with react files
./resources
directory with javascript files
./ui
directory empty
This error always comes up running my terminal as adminstrator or not. This error does not occur when typescript is selected as the base.
โ Copying files to resourceError: EPERM: operation not permitted, copyfile 'C:\Users\(myname)\Desktop\test/cfa-templates/react_typescript/' -> 'C:\Users\(myname)\Desktop\test/ui/'
at Object.copyFileSync (node:fs:2054:3)
at copyFiles (C:\Users\(myname)\AppData\Roaming\npm\node_modules\@project-error\cli\dist\functions\tools\copiers\JavaScript.js:12:22)
at Object.installTemplate (C:\Users\(myname)\AppData\Roaming\npm\node_modules\@project-error\cli\dist\functions\tools\github.js:50:9)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async Object.createResource [as default] (C:\Users\(myname)\AppData\Roaming\npm\node_modules\@project-error\cli\dist\functions\createResource.js:13:5)
at async Object.createCommand (C:\Users\(myname)\AppData\Roaming\npm\node_modules\@project-error\cli\dist\commands\create.js:29:5) {
errno: -4048,
syscall: 'copyfile',
code: 'EPERM',
path: 'C:\\Users\\(myname)\\Desktop\\test/cfa-templates/react_typescript/',
dest: 'C:\\Users\\(myname)\\Desktop\\test/ui/'
}
โ Failed to copy files!
{
language: { val: 'TypeScript' },
resourceName: { val: 'test-react' },
packages: { val: [] },
uiFramework: { val: 'react_typescript' }
}
fxmanifest references build folder for the react project
fxmanifest references a directory called html
and 3 random files
ui_page 'html/index.html
files {
'html/index.html',
'html/index.css',
'html/index.js'
}
this should be
ui_page 'ui/build/index.html'
files {
'ui/build/index.html',
'ui/build/**/*',
}
I'm getting an error when running pe-create no matter the configuration.
I've tried v16 and v18 with no success
โ [ui] git:(main) โ pe-create
____ _ _ _____
| _ \ _ __ ___ (_) ___ ___ | |_ | ____| _ __ _ __ ___ _ __
| |_) || '__|/ _ \ | | / _ \ / __|| __| | _| | '__|| '__|/ _ \ | '__|
| __/ | | | (_) || || __/| (__ | |_ | |___ | | | | | (_) || |
|_| |_| \___/_/ | \___| \___| \__| |_____||_| |_| \___/ |_|
|__/
? Type in the name of the resource: banner
? Type in the name of the resource: banner
? Please select a language to create a FiveM App for...
? Please select a language to create a FiveM App for... JavaScript
{ val: 'JavaScript' }
? What JavaScript packages would you like to use with this project?
? What JavaScript packages would you like to use with this project? eslint, pret
tier
? Do you want to include a UI framework?
? Do you want to include a UI framework? React with JavaScript
selected ui framework react_javascript
โ Failed to create resource path!
โ Successfully cloned templates
โ Copying files to resourceError: Cannot find module './copiers/JavaScript'
Require stack:
- /home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/functions/tools/github.js
- /home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/functions/createResource.js
- /home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/commands/create.js
- /home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/index.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:110:18)
at /home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/functions/tools/github.js:48:79
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async installTemplate (/home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/functions/tools/github.js:48:31)
at async createResource (/home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/functions/createResource.js:13:5)
at async createCommand (/home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/commands/create.js:29:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/functions/tools/github.js',
'/home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/functions/createResource.js',
'/home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/commands/create.js',
'/home/docker/.nvm/versions/node/v16.20.1/lib/node_modules/@project-error/cli/dist/index.js'
]
}
โ Failed to copy files!
โ Successfully installed default packages
โ Successfully installed UI packages
โ Successfully installed eslint
โ Successfully installed prettier
โ Successfully installed selected packages
Success!
Result of prompts:
{
language: { val: 'JavaScript' },
resourceName: { val: 'banner' },
packages: { val: [ 'eslint', 'prettier' ] },
uiFramework: { val: 'react_javascript' }
}
Complete
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.