facebook

Selected source folder must be a valid apps location

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #603360 Reply

    Dale
    Participant

    Hi

    I’m using webclipse / angular IDE latest.

    I recently updated from angular 4 to latest.

    When i try to create anything new through the new -> component i get the error: ‘Selected source folder must be a valid apps location’ even though it’s the correct location

    Any ideas?

    Cheers
    Dale

    Attachments:
    You must be logged in to view attached files.
    #603362 Reply

    Dale
    Participant

    SOLVED:

    As i created a new project and copied that angular.json (to replace angular-cli.json) into the existing project, some of the params were incorrect.

    The angular.json uses the project name in the config, so to fix this issue replace

    “defaultProject”: “latest-build”

    with the name of your project

    “defaultProject”: “FactsStax-REPO”

    Also the project name is used a few times in the file so replace all instances of it with your project name.

    #603363 Reply

    Dale
    Participant

    Also it doesn’t work with latest angular: “@angular/cli”: “7.0.5”

    {
    “name”: “facts-stax”,
    “version”: “0.0.0”,
    “license”: “MIT”,
    “scripts”: {
    “ng”: “ng”,
    “start”: “ng serve –proxy-config proxy.conf.json”,
    “build”: “ng build –prod”,
    “test”: “ng test”,
    “lint”: “ng lint”,
    “e2e”: “ng e2e”
    },
    “private”: true,
    “dependencies”: {
    “@angular/animations”: “7.0.3”,
    “@angular/common”: “7.0.3”,
    “@angular/compiler”: “7.0.3”,
    “@angular/core”: “7.0.3”,
    “@angular/forms”: “7.0.3”,
    “@angular/http”: “7.0.3”,
    “@angular/platform-browser”: “7.0.3”,
    “@angular/platform-browser-dynamic”: “7.0.3”,
    “@angular/router”: “7.0.3”,
    “@fortawesome/fontawesome-free”: “^5.5.0”,
    “core-js”: “^2.4.1”,
    “moment”: “^2.20.1”,
    “rxjs”: “^6.3.3”,
    “web-animations-js”: “^2.3.1”,
    “zone.js”: “^0.8.26”
    },
    “devDependencies”: {
    “@angular-devkit/build-angular”: “^0.10.5”,
    “@angular/cli”: “7.0.5”,
    “@angular/compiler-cli”: “7.0.3”,
    “@angular/language-service”: “7.0.3”,
    “@types/jasmine”: “^2.8.6”,
    “@types/jasminewd2”: “~2.0.2”,
    “@types/node”: “^6.0.101”,
    “angular-ide”: “^0.9.39”,
    “codelyzer”: “^4.0.1”,
    “jasmine-core”: “~2.8.0”,
    “jasmine-spec-reporter”: “~4.2.1”,
    “karma”: “~2.0.0”,
    “karma-chrome-launcher”: “~2.2.0”,
    “karma-cli”: “~1.0.1”,
    “karma-coverage-istanbul-reporter”: “^1.4.1”,
    “karma-jasmine”: “~1.1.0”,
    “karma-jasmine-html-reporter”: “^0.2.2”,
    “protractor”: “~5.1.2”,
    “ts-node”: “~4.1.0”,
    “tslint”: “~5.11.0”,
    “typescript”: “3.1.6”
    }
    }

    —————————-
    /c/development/angularIDEWorkspace/FactsStax-REPO
    $ ng g component modules/features/livestax/delete2
    module.js:549
    throw err;
    ^

    Error: Cannot find module ‘C:\development\angularIDEWorkspace\FactsStax-REPO\node_modules\@angular\cli\ember-cli\lib\cli\cli’
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\development\angularIDEWorkspace\FactsStax-REPO\node_modules\angular-ide\bin\ng:39:19)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

    ——————

    However, running ng g component modules/features/livestax/xxx in the terminal still works

    #603367 Reply

    support-swapna
    Moderator

    Dale,

    Glad that you resolved the issue with the source folder. From the details you shared, the angular-ide version (0.9.39) in the package.json file is not the latest for Angular CLI 7.0.5 project.

    Please update it to 0.9.52, run npm install for the project from the Terminal+ view to update it and check if it fixes the problem with component creation.

    Let us know how you get on with it.

    –Swapna
    Genuitec Support

    #603369 Reply

    Dale
    Participant

    Hi Swapna

    Updating to 0.9.52 did trick, working fine!

    Thanks
    Dale

    #603370 Reply

    support-swapna
    Moderator

    Dale,

    Glad that it helps. Thank you for getting back to us.
    Please let us know if you see any other issues.

    –Swapna
    Genuitec Support

    #607569 Reply

    schoeller
    Participant

    I just started having a similar problem. It started after I did a “Check for updates” in Eclipse. If I right click on a folder and select “New component” it brings up the dialog with the source folder field empty. If try to browse to the directory, I get the error message, “Selected source folder must be a valid apps location”.

    The project in question is the module gedbrowserng-frontend inside the larger Maven driven Spring Boot project https://github.com/dickschoeller/gedbrowser. That module uses the maven frontend plugin to drive builds. As I mentioned this was working just fine until the update. After the problem started, I upgraded from Angular IDE to CodeMix, but that had no effect.

    I can create a component just fine with at the command line in a terminal window.

    #607570 Reply

    schoeller
    Participant

    Never mind. I just realized that my problem was similar to the original poster’s, in that the project name in angular.json did not align with the project name in the pom.xml. The project name in the pom file is what created the Eclipse project. In any case, this used to work and it stopped working. I’ve edited the file and all seems good.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Selected source folder must be a valid apps location

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in