Loopback: Error: Invalid workspace: no facets found.

Created on 20 Nov 2014  ยท  9Comments  ยท  Source: strongloop/loopback

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

bug stale

Most helpful comment

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.

All 9 comments

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.

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

screen

it could be issues with my Workspace path?

Thanks

OSX 10.10.1, the same problem...

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"
    ]
  }
}

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

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

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)

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)

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

futurus picture futurus  ยท  3Comments

Overdrivr picture Overdrivr  ยท  4Comments

daankets picture daankets  ยท  4Comments

nmklong picture nmklong  ยท  3Comments

rkmax picture rkmax  ยท  3Comments