loopback icon indicating copy to clipboard operation
loopback copied to clipboard

Error: Invalid workspace: no facets found.

Open panduroab opened this issue 12 years ago • 9 comments

Hi, I can create and run a new loopback project, but when I try to create a new Module into the path project this error aperce:

slc loopback:model

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Invalid workspace: no facets found.
    at /usr/lib/node_modules/strongloop/node_modules/generator-loopback/node_modules/loopback-workspace/models/workspace.js:262:10
    at /usr/lib/node_modules/strongloop/node_modules/generator-loopback/node_modules/loopback-workspace/node_modules/loopback-datasource-juggler/lib/dao.js:833:7
    at /usr/lib/node_modules/strongloop/node_modules/generator-loopback/node_modules/loopback-workspace/node_modules/loopback-datasource-juggler/lib/connectors/memory.js:345:7
    at process._tickCallback (node.js:419:13)

I have Ubuntu 14.04 and strongloop v2.9.2

strongloop v2.9.2 (node v0.10.33)
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

I tried uninstall and install strongloop again but it didn't work, what else I can try?

Thanks

panduroab avatar Nov 20 '14 15:11 panduroab

You need to run ‘slc loopback:model’ under the root directory of your application (generated by slc loopback).

Thanks,


Raymond Feng Co-Founder and Architect @ StrongLoop, Inc.

StrongLoop http://strongloop.com/ makes it easy to develop APIs http://strongloop.com/mobile-application-development/loopback/ in Node, plus get DevOps capabilities http://strongloop.com/node-js-performance/strongops/ like monitoring, debugging and clustering.

On Nov 20, 2014, at 7:13 AM, Abraham [email protected] wrote:

Hi, I can create and run a new loopback project, but when I try to create a new Module into the path project this error aperce:

slc loopback:model

events.js:72 throw er; // Unhandled 'error' event ^ Error: Invalid workspace: no facets found. at /usr/lib/node_modules/strongloop/node_modules/generator-loopback/node_modules/loopback-workspace/models/workspace.js:262:10 at /usr/lib/node_modules/strongloop/node_modules/generator-loopback/node_modules/loopback-workspace/node_modules/loopback-datasource-juggler/lib/dao.js:833:7 at /usr/lib/node_modules/strongloop/node_modules/generator-loopback/node_modules/loopback-workspace/node_modules/loopback-datasource-juggler/lib/connectors/memory.js:345:7 at process._tickCallback (node.js:419:13) I have Ubuntu 14.04 and strongloop v2.9.2

strongloop v2.9.2 (node v0.10.33) ├── [email protected] ├─┬ [email protected] │ └── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected] I tried uninstall and install strongloop again but it didn't work, what else I can try?

Thanks

— Reply to this email directly or view it on GitHub https://github.com/strongloop/loopback/issues/845.

raymondfeng avatar Nov 20 '14 16:11 raymondfeng

Yes, I know and I did that and the result is the same

screen

it could be issues with my Workspace path?

Thanks

panduroab avatar Nov 20 '14 18:11 panduroab

OSX 10.10.1, the same problem...

veslo1 avatar Nov 24 '14 21:11 veslo1

The system is checking folder validity by looking for facets.

You need to have a model-config.json in the working dir which contains a minimum of:

{
  "_meta": {
    "sources": [
      "../common/models"
    ]
  }
}

Cosmin-Parvulescu avatar Dec 13 '14 01:12 Cosmin-Parvulescu

@panduroab Did @Cosmin-Parvulescu's solution work for you? Is this good to close?

superkhau avatar Feb 26 '15 00:02 superkhau

Mac OSX 10.10.05, .. I double checked executing the command on the project directory, getting same error, ..

EDIT: I might have a typo, I'll confirm later

dmasson avatar Jan 12 '16 17:01 dmasson

No, It wasn't a typo, .. after checking out:

git clone https://github.com/strongloop/loopback-getting-started.git

I run (inside the loopback-getting-started directory):

slc loopback:datasource

Just found a .yo-rc.json in a parent directory. Setting the project root at: /Users/danielmasson events.js:141 throw er; // Unhandled 'error' event ^

Error: Invalid workspace: no facets found. at /usr/local/lib/node_modules/strongloop/node_modules/generator-loopback/node_modules/loopback-workspace/common/models/workspace.js:287:14 at /usr/local/lib/node_modules/strongloop/node_modules/loopback-datasource-juggler/lib/dao.js:1519:9 at Object.async.each (/usr/local/lib/node_modules/strongloop/node_modules/loopback-datasource-juggler/node_modules/async/lib/async.js:153:20) at allCb (/usr/local/lib/node_modules/strongloop/node_modules/loopback-datasource-juggler/lib/dao.js:1455:13) at /usr/local/lib/node_modules/strongloop/node_modules/loopback-datasource-juggler/lib/connectors/memory.js:372:7 at doNTCallback0 (node.js:419:9) at process._tickDomainCallback (node.js:389:13) at process. (/usr/local/lib/node_modules/strongloop/node_modules/loopback/node_modules/continuation-local-storage/node_modules/async-listener/index.js:19:15)

dmasson avatar Jan 12 '16 21:01 dmasson

Same error when running this workshop step on a Windows 7 machine. Everyone else, even other Windows 7 users, was able to complete the steps successfully.

C:\MyTestLoopBack>slc loopback:model

events.js:141

      throw er; // Unhandled 'error' event

      ^



Error: Invalid workspace: no facets found.

    at C:\Users\AC06752\AppData\Roaming\npm\node_modules\strongloop\node_modules

\generator-loopback\node_modules\loopback-workspace\common\models\workspace.js:2

87:14

    at C:\Users\AC06752\AppData\Roaming\npm\node_modules\strongloop\node_modules

\loopback-datasource-juggler\lib\dao.js:1561:9

    at Object.async.each (C:\Users\AC06752\AppData\Roaming\npm\node_modules\stro

ngloop\node_modules\loopback-datasource-juggler\node_modules\async\lib\async.js:

153:20)

    at allCb (C:\Users\AC06752\AppData\Roaming\npm\node_modules\strongloop\node_

modules\loopback-datasource-juggler\lib\dao.js:1497:13)

    at C:\Users\AC06752\AppData\Roaming\npm\node_modules\strongloop\node_modules

\loopback-datasource-juggler\lib\connectors\memory.js:435:7

    at nextTickCallbackWith0Args (node.js:415:9)

    at process._tickDomainCallback (node.js:385:13)

    at process.<anonymous> (C:\Users\AC06752\AppData\Roaming\npm\node_modules\st

rongloop\node_modules\loopback\node_modules\continuation-local-storage\node_modu

les\async-listener\index.js:19:15)

jakepeyser avatar Feb 23 '16 15:02 jakepeyser

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

stale[bot] avatar Sep 06 '17 14:09 stale[bot]