erikschlegel / sails-generate-reactjs

A generator to create a new ReactJS web platform powered by Sails
MIT License
92 stars 10 forks source link

Failed to load "sails-generate-reactjs" #8

Open appjitsu opened 9 years ago

appjitsu commented 9 years ago

$ sails new sails-react --force

this is in my ~/.sailsrc file:

{
    "generators" : {
        "modules" : {
            "frontend" : "sails-generate-reactjs"
        }
    }
}

error: Error: Generator Error: Failed to load "sails-generate-reactjs"... (Error: Cannot find module '/Users/jcochran/clients/node_modules/sails-generate-reactjs') at parseTarget (/usr/local/lib/node_modules/sails/node_modules/sails-generate/lib/target.js:264:7) at tryToParseTarget (/usr/local/lib/node_modules/sails/node_modules/sails-generate/lib/target.js:44:7) at Object.async.until (/usr/local/lib/node_modules/sails/node_modules/sails-generate/node_modules/async/lib/async.js:647:13) at /usr/local/lib/node_modules/sails/node_modules/sails-generate/node_modules/async/lib/async.js:651:23 at /usr/local/lib/node_modules/sails/node_modules/sails-generate/lib/target.js:47:16 at parseTarget (/usr/local/lib/node_modules/sails/node_modules/sails-generate/lib/target.js:192:16) at tryToParseTarget (/usr/local/lib/node_modules/sails/node_modules/sails-generate/lib/target.js:44:7) at Object.async.until (/usr/local/lib/node_modules/sails/node_modules/sails-generate/node_modules/async/lib/async.js:647:13) at generateTarget (/usr/local/lib/node_modules/sails/node_modules/sails-generate/lib/target.js:39:9) at /usr/local/lib/node_modules/sails/node_modules/sails-generate/lib/generate.js:143:15 [Error: Generator Error: Failed to load "sails-generate-reactjs"... (Error: Cannot find module '/Users/jcochran/clients/node_modules/sails-generate-reactjs')]

pdavid0 commented 8 years ago

Same here, installed the generator locally, then same error but for Bower, and I definitely have a global Bower installed.

chotiwat commented 8 years ago

Here is my .sailsrc that works:

{
    "generators" : {
        "modules" : {
            "frontend" : "reactjs"
        }
    }
}

Perhaps the new version of Sails has changed the way to configure generator.

Hope this helps!

DimitryDushkin commented 8 years ago

@chotiwat It helped! This should be changed in readme.