Code Monkey home page Code Monkey logo

Comments (3)

little-apps avatar little-apps commented on August 12, 2024

This error specifically is because you're using an older version of NodeJS. You need to update to at least NodeJS v10.10.0 for this problem to go away. However, after this you will most likely get another problem relating to the symbolic links:

EEXIST: file already exists, symlink 'xxxxx\build\index.html' -> 'xxxxx\www\index.html'

I was able to patch it by:

  1. Installing the fs-extra package:

$ npm i fs-extra

  1. Changing the fs require in assets\hooks\run-prod.js:
    const fs = require('fs') -> const fs = require('fs-extra')

  2. Modifying the createSymlink function in assets\hooks\run-prod.js to:

const createSymlink = () => {
fs.removeSync(wwwPath)
fs.copySync(buildPath, wwwPath)
}

There maybe a way to make the symlinks work but I find it's way easier to just copy the directory (especially for a production build).

from cordova-react-template.

lukeforehand avatar lukeforehand commented on August 12, 2024

bumped into this today, searching for the fix was difficult, can you publish a fix so cordova create --template cordova-react works?

from cordova-react-template.

NengakDakup avatar NengakDakup commented on August 12, 2024

I basically ran the command with admin privileges and it solved the issue for me.
For Ubuntu users, you can prefix your command with the "sudo" command, then for windows just basically run command prompt as an admin.

from cordova-react-template.

Related Issues (3)

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.