1. #1
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    13
    Vote Rating
    1
    DodgyDave is on a distinguished road

      0  

    Default Sencha build basic question - What am I missing?

    Sencha build basic question - What am I missing?


    I've started trying to use the sencha sdk and can't get the most simple of builds running on Windows 7. All I wanted to do was generate the default app and do a build and that throws an error:

    Error: EPERM, operation not permitted 'C:\Userdata\Temp\Test2\build\production\s
    dk\sencha-touch.js'

    Below are the steps I followed. I also tried modifying the app.joson to change logger:"no" to logger:"false".

    People seem to be having problems but I can't even get passed the basics.


    Cd C:\Userdata\myChild\Mobile\Trunk\Web\Ifp.Mobile.Web\Content\sencha2.0.0

    C:\Userdata\myChild\Mobile\Trunk\Web\Ifp.Mobile.Web\Content\sencha2.0.0>sencha app create MyApp c:\UserData\Temp\Test2

    [INFO] Created file c:\UserData\Temp\Test2\.senchasdk
    [INFO] Created file c:\UserData\Temp\Test2\index.html
    [INFO] Created file c:\UserData\Temp\Test2\app.js
    [INFO] Created file c:\UserData\Temp\Test2\packager.json
    [INFO] Created file c:\UserData\Temp\Test2\app.json
    [INFO] Created file c:\UserData\Temp\Test2\app\view\Main.js
    [INFO] Copied dir: c:\UserData\Temp\Test2\sdk\src
    [INFO] Copied dir: c:\UserData\Temp\Test2\sdk\resources
    [INFO] Copied dir: c:\UserData\Temp\Test2\resources\icons
    [INFO] Copied dir: c:\UserData\Temp\Test2\resources\loading
    [INFO] Copied dir: c:\UserData\Temp\Test2\sdk\command
    [INFO] Copied file: c:\UserData\Temp\Test2\sdk\microloader\development.js
    [INFO] Copied file: c:\UserData\Temp\Test2\sdk\microloader\testing.js
    [INFO] Copied file: c:\UserData\Temp\Test2\sdk\microloader\production.js
    [INFO] Copied file: c:\UserData\Temp\Test2\sdk\version.txt
    [INFO] Copied file: c:\UserData\Temp\Test2\sdk\sencha-touch.js
    [INFO] Copied file: c:\UserData\Temp\Test2\sdk\sencha-touch-all.js
    [INFO] Created file c:\UserData\Temp\Test2\resources\sass\app.scss
    [INFO] Created file c:\UserData\Temp\Test2\resources\sass\config.rb
    [INFO] Copied file: c:\UserData\Temp\Test2\resources\css\app.css


    Cd c:\UserData\Temp\Test2


    C:\Userdata\Temp\Test2>sencha app build production
    [INFO] Deploying your application to C:\Userdata\Temp\Test2\build\production
    [INFO] Copied sdk/sencha-touch.js
    [INFO] Copied app.js
    [INFO] Copied resources/css/app.css
    [INFO] Copied resources/images
    [INFO] Copied resources/icons
    [INFO] Copied resources/loading
    [INFO] Resolving your application dependencies...
    [INFO] Found 139 dependencies. Concatenating all into app.js...
    fs.js:230
    return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
    ^
    Error: EPERM, operation not permitted 'C:\Userdata\Temp\Test2\build\production\s
    dk\sencha-touch.js'
    at Object.openSync (fs.js:230:18)
    at Object.writeFileSync (fs.js:618:15)
    at [object Object].write (C:\Userdata\Temp\Test2\sdk\command\src\module\File
    System.js:185:23)
    at [object Object].<anonymous> (C:\Userdata\Temp\Test2\sdk\command\src\modul
    e\Application.js:223:24)
    at Array.forEach (native)
    at [object Object].<anonymous> (C:\Userdata\Temp\Test2\sdk\command\src\modul
    e\Application.js:218:20)
    at [object Object].<anonymous> (C:\Userdata\Temp\Test2\sdk\command\src\modul
    e\Application.js:84:21)
    at ChildProcess.exithandler (child_process.js:281:7)
    at ChildProcess.emit (events.js:70:17)
    at maybeExit (child_process.js:361:16)

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    logger should be false not "false"
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    13
    Vote Rating
    1
    DodgyDave is on a distinguished road

      0  

    Default


    I've made the change to logger, deleted the old build folder and still get the same error.

    This is a subset of app.json with the change

    /**
    * Build options
    */
    "buildOptions": {
    "product": "touch",
    "minVersion": 3,
    "debug": false,
    "logger": false
    },

    C:\Userdata\Temp\Test2>sencha app build production
    [INFO] Deploying your application to C:\Userdata\Temp\Test2\build\production
    [INFO] Copied sdk/sencha-touch.js
    [INFO] Copied app.js
    [INFO] Copied resources/css/app.css
    [INFO] Copied resources/images
    [INFO] Copied resources/icons
    [INFO] Copied resources/loading
    [INFO] Resolving your application dependencies...
    [INFO] Found 139 dependencies. Concatenating all into app.js...
    fs.js:230
    return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
    ^
    Error: EPERM, operation not permitted 'C:\Userdata\Temp\Test2\build\production\s
    dk\sencha-touch.js'
    at Object.openSync (fs.js:230:18)
    at Object.writeFileSync (fs.js:618:15)
    at [object Object].write (C:\Userdata\Temp\Test2\sdk\command\src\module\File
    System.js:185:23)
    at [object Object].<anonymous> (C:\Userdata\Temp\Test2\sdk\command\src\modul
    e\Application.js:223:24)
    at Array.forEach (native)
    at [object Object].<anonymous> (C:\Userdata\Temp\Test2\sdk\command\src\modul
    e\Application.js:218:20)
    at [object Object].<anonymous> (C:\Userdata\Temp\Test2\sdk\command\src\modul
    e\Application.js:84:21)
    at ChildProcess.exithandler (child_process.js:281:7)
    at ChildProcess.emit (events.js:70:17)
    at maybeExit (child_process.js:361:16)

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Just by looking at it, it fails when it is trying to write a file, permission issue?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    13
    Vote Rating
    1
    DodgyDave is on a distinguished road

      0  

    Default


    The problem is the files were under source control so when they were copied to the build folder they were all copied with the same read-only attribute. The build failed as it couldn't write to the read-only file.

    A useful enhancement to the build process would be to remove the readonly attribute on files copied to the build folder.

Thread Participants: 1