Giter Site home page Giter Site logo

pe-cli's People

Contributors

aleksanderevensen avatar dependabot[bot] avatar derletzteritter avatar gh-action-bump-version avatar gjelten avatar liamdormon avatar nnsdev avatar tasooneasia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pe-cli's Issues

package.json for react has incorrect homepage

Options to reproduce

{
  language: { val: 'TypeScript' },
  resourceName: { val: 'test-react' },
  packages: { val: [] },
  uiFramework: { val: 'react_typescript' }
}

Problem

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.

Expected Outcome

homepage matches the folder structure of the generated boilerplate so that the UI can be rendered in-game.

Actual Outcome

homepage uses the wrong directory

Package Support - Suggestion

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 ๐Ÿ˜„

NPM giving Error

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

.gitignore file

It would be nice if cli would also generate a .gitignore file for the new project.

Selecting React with javascript fails.

Options

{
  language: { val: 'JavaScript' },
  resourceName: { val: 'test' },
  packages: { val: [ 'eslint', 'prettier' ] },
  uiFramework: { val: 'react_typescript' }
}

Expected Output

./resources directory with javascript files
./ui directory with react files

Actual Output

./resources directory with javascript files
./ui directory empty

Errors

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!

fxmanifest when creating a project with react incorrectly references the build folder

Options to reproduce

{
  language: { val: 'TypeScript' },
  resourceName: { val: 'test-react' },
  packages: { val: [] },
  uiFramework: { val: 'react_typescript' }
}

Expected Outcome

fxmanifest references build folder for the react project

Actual Outcome

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/**/*',
}

Failed to Copy Files

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.