Using seed app

424 views
Skip to first unread message

Frank Panetta

unread,
Aug 2, 2013, 9:21:59 AM8/2/13
to cuj...@googlegroups.com
Hi,

I wanted to run the seed app to get started but get a 404 the error that curl.js can't be found. I noticed that it was a bower project that gets installed but I can't seem to locate the lib directory where the modules should be.

I followed the guide but with no luck. Is there another step required to get the started kit working?

Thanks
Frank 

Scott Andrews

unread,
Aug 2, 2013, 9:32:00 AM8/2/13
to cuj...@googlegroups.com
Frank,

I just tried a clean install and it worked.  Can you try deleting the lib directory in the project and running `npm install` again.

-Scott


Frank 

--
You received this message because you are subscribed to the Google Groups "cujojs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cujojs+un...@googlegroups.com.
To post to this group, send email to cuj...@googlegroups.com.
Visit this group at http://groups.google.com/group/cujojs.
To view this discussion on the web visit https://groups.google.com/d/msgid/cujojs/bdef029f-e81b-4a88-a745-8513143eded4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Frank Panetta

unread,
Aug 2, 2013, 9:50:36 AM8/2/13
to cuj...@googlegroups.com
Hi scothis,

I'm not able to see a lib directory. I have repeated the process into a new directory but I still don't get a lib directory. Not sure what's going on? I've pasted the commands and output below

Franks-Mac:Projects frank$ git clone https://github.com/cujojs/seed.git myapp
Cloning into 'myapp'...
remote: Counting objects: 172, done.
remote: Compressing objects: 100% (91/91), done.
remote: Total 172 (delta 78), reused 168 (delta 74)
Receiving objects: 100% (172/172), 55.22 KiB | 42 KiB/s, done.
Resolving deltas: 100% (78/78), done.
Franks-Mac:Projects frank$ cd myapp/
Franks-Mac:myapp frank$ npm install
npm WARN package.json my-awesome...@0.2.3 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN cannot run in wd my-awesome...@0.2.3 bower install (wd=/Users/frank/Projects/myapp)
se...@0.0.7 node_modules/serv
├── opti...@0.3.7 (word...@0.0.2)
└── exp...@2.5.11 (q...@0.4.2, mi...@1.2.4, mkd...@0.3.0, con...@1.9.2)

bo...@1.0.3 node_modules/bower
├── ju...@0.2.1
├── sudo-...@0.2.0
├── stringif...@0.1.4
├── abb...@1.0.4
├── wh...@1.0.5
├── chm...@0.1.0
├── grace...@2.0.0
├── ar...@0.0.2
├── bower-...@0.1.0
├── rim...@2.2.2
├── op...@0.0.4
├── col...@0.6.1
├── bower-endp...@0.2.0
├── lru-...@2.3.0
├── no...@2.1.2
├── t...@0.0.20
├── mkd...@0.3.5
├── q...@0.9.6
├── sem...@2.0.11
├── mo...@0.6.0
├── fst...@0.1.24 (inhe...@2.0.0)
├── bower-regi...@0.1.1 (as...@0.2.9)
├── request-...@0.2.3 (throt...@0.0.2)
├── request...@0.1.8 (re...@0.6.0)
├── bower...@0.2.0 (deep-...@0.2.5)
├── t...@0.1.18 (inhe...@2.0.0, block-...@0.0.7)
├── fstream...@0.0.7 (inhe...@2.0.0, mini...@0.2.12)
├── bower-...@0.2.0-rc.1 (os...@0.0.3, opti...@0.6.0)
├── gl...@3.2.6 (inhe...@2.0.0, mini...@0.2.12)
├── handl...@1.0.12 (opti...@0.3.7, ugli...@2.3.6)
├── prom...@0.2.0 (re...@1.0.5)
├── un...@0.1.8 (setimm...@1.0.1, readabl...@1.0.2, match-...@0.0.2, bin...@0.3.0, pulls...@0.4.0)
├── inqu...@0.2.3 (mute-...@0.0.3, as...@0.2.9, lod...@1.2.1, cli-...@0.2.2)
├── req...@2.25.0 (foreve...@0.5.0, aws-...@0.3.0, q...@0.6.5, json-stri...@5.0.0, tunnel...@0.3.0, oauth...@0.3.0, cooki...@0.3.0, node...@1.4.0, mi...@1.2.10, http-si...@0.10.0, form...@0.1.0, ha...@1.0.0)
└── update-...@0.1.4 (confi...@0.1.2, req...@2.22.0)
Franks-Mac:myapp frank$ npm start

> my-awesome...@0.2.3 start /Users/frank/Projects/myapp
> serv --port 8000

Serving files from /Users/frank/Projects/myapp at http://127.0.0.1:8000

Scott Andrews

unread,
Aug 2, 2013, 10:21:15 AM8/2/13
to cuj...@googlegroups.com
Hmm...  There is a postinstall script in the seed package.json that should invoke `bower install`.  Bower will download the client side dependencies and place them in the lib directory.

What version of node/npm are you running?

-Scott


Frank Panetta

unread,
Aug 2, 2013, 10:26:44 AM8/2/13
to cuj...@googlegroups.com
I'm running Node 10.15 and npm 1.3.5.

I do have a lib directory under the bower directory. What it has is the following directories:
commands
core
renderers
util

I've search this lib directory for the cujo modules but can't find any.

Frank

John Hann

unread,
Aug 2, 2013, 10:31:06 AM8/2/13
to cuj...@googlegroups.com
Hmmmm.... I see npm installing bower in that transcript. I wasn't expecting to see that. It's not a bad thing; it's just something I doubt any if us or our existing cujojs users would see. We would typically already have bower installed.

Scott, I wonder if there is some difference when bower isn't already installed globally?

Frank, if you have a minute, maybe just try `npm install -g bower` and then following the seed directions? (I'm on the road today and can't try it.)

Thanks!

-- John

Frank Panetta

unread,
Aug 2, 2013, 10:33:05 AM8/2/13
to cuj...@googlegroups.com
OK. Running 'bower install' manually loads all the required modules and works.

Not sure why the post install didn't work.

Frank

--
You received this message because you are subscribed to a topic in the Google Groups "cujojs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cujojs/OQ33cz2Xa_k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cujojs+un...@googlegroups.com.

To post to this group, send email to cuj...@googlegroups.com.
Visit this group at http://groups.google.com/group/cujojs.

Brian Cavalier

unread,
Aug 2, 2013, 10:53:32 AM8/2/13
to cuj...@googlegroups.com
Sorry for the trouble, Frank.  Yes, we have the package.json configured so that bower is installed locally (rather than relying on a global bower install), and then the postinstall npm hook runs bower install.  I just tried it with the same versions of node and npm as you and it worked, so maybe there was some weird hiccup that caused npm to skip the postinstall.  Very strange.
To unsubscribe from this group and all its topics, send an email to cujojs+unsubscribe@googlegroups.com.

Frank Panetta

unread,
Aug 2, 2013, 10:54:27 AM8/2/13
to cuj...@googlegroups.com
I ran sudo npm list -g to see if it was already installed globally and it was. bower 0.9.2. This was installed with yeoman.

So to test I rean 'npm install bower -g' and got this error

npm ERR! peerinvalid The package bower does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer y...@1.0.0-rc.1 wants bower@~0.9.2

npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/frank
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/frank/npm-debug.log
npm ERR! not ok code 0

and now when I run 'npm list -g' I have bo...@1.0.3 with a peer invalid error

So I uninstalled global yo and global bower and reinstalled bower globally and ran through the process again and it's still not running the post install.

I see the following warning

npm WARN cannot run in wd my-awesome...@0.2.3 bower install (wd=/Users/frank/cujoApp3)

Scott Andrews

unread,
Aug 2, 2013, 10:54:29 AM8/2/13
to cuj...@googlegroups.com
@Frank
I just upgraded to node 0.10.15 and npm 0.3.5, the bower components are still correctly installed.

Can you try something silly? Try changing the postinstall script in package.json to 'env', and run `npm install` again. Do you see your environment displayed on the console?


@John
We intentionally install a local copy of bower.  Using the global version can be problematic in some cases, and unavailable in others.  For example, bower recently underwent a major change before 1.0 that had backcompat issues, if we relied on a global bower install, we don't know what version of bower will be used.  The other case is for remote deployments where bower isn't already installed.  For example on Cloud Foundry or Heroku, you have to install your own version of bower first.




--
You received this message because you are subscribed to the Google Groups "cujojs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cujojs+un...@googlegroups.com.

To post to this group, send email to cuj...@googlegroups.com.
Visit this group at http://groups.google.com/group/cujojs.

Frank Panetta

unread,
Aug 2, 2013, 11:07:51 AM8/2/13
to cuj...@googlegroups.com
Hi Scott,

I updated package.json as suggested but get the following

npm WARN cannot run in wd my-awesome...@0.2.3 env 

I also manually installed bower locally but still no luck.

Frank
To unsubscribe from this group and all its topics, send an email to cujojs+unsubscribe@googlegroups.com.

To post to this group, send email to cuj...@googlegroups.com.
Visit this group at http://groups.google.com/group/cujojs.
To view this discussion on the web visit https://groups.google.com/d/msgid/cujojs/8eed7cf9-51a2-4be7-a67c-9cda40171ada%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Scott Andrews

unread,
Aug 2, 2013, 11:18:45 AM8/2/13
to cuj...@googlegroups.com
The global version of bower shouldn't make a difference, as the local version will always be resolved first.

Brian found a bug that sounds like it may be a file permission issue:

Can you post your npm-debug.log?

-Scott


Frank Panetta

unread,
Aug 2, 2013, 11:24:49 AM8/2/13
to cuj...@googlegroups.com
I found this issue on npm. It sort of shed some light on what might be happening.

Thanks
Frank

On Saturday, 3 August 2013 00:54:29 UTC+10, scothis wrote:
To unsubscribe from this group and all its topics, send an email to cujojs+unsubscribe@googlegroups.com.

To post to this group, send email to cuj...@googlegroups.com.
Visit this group at http://groups.google.com/group/cujojs.
To view this discussion on the web visit https://groups.google.com/d/msgid/cujojs/8eed7cf9-51a2-4be7-a67c-9cda40171ada%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Frank Panetta

unread,
Aug 2, 2013, 11:27:08 AM8/2/13
to cuj...@googlegroups.com
No problem. You guys are very helpful.

Brian Cavalier

unread,
Aug 2, 2013, 12:34:28 PM8/2/13
to cuj...@googlegroups.com
From a bit more googling, it looks like npm reports that particular error in a variety of situations (I saw one report about the cause being a firewall issue!), but some sort of permission problem seemed to be the most common thing.  Any chance npm is generating an error or debug log?

Frank Panetta

unread,
Aug 2, 2013, 12:35:34 PM8/2/13
to cuj...@googlegroups.com
I figure out what the problem was.

in npm unsafe-perm was set to false. Once I set it to true (which is the default) then then everything starting working as expected.

Thanks for your help guys and sorry for messy you about.

Frnak

Frank Panetta

unread,
Aug 2, 2013, 12:44:33 PM8/2/13
to cuj...@googlegroups.com
Yes, that make sense. I found this on npm.
"If you would like to ensure that npm always runs scripts as the "nobody" user, and have it fail if it cannot downgrade permissions, then set the following configuration param:
npm config set unsafe-perm false

This will prevent running in unsafe mode, even as non-root users."

located here. So once I reset unsafe-perm back to the default value of true everything worked.

Thanks for your help.

Frank Panetta

unread,
Aug 2, 2013, 12:45:23 PM8/2/13
to cuj...@googlegroups.com
Sorry. Yes, my unsafe-perm was set to false for some reason.

Brian Cavalier

unread,
Aug 2, 2013, 12:56:56 PM8/2/13
to cuj...@googlegroups.com
Wow, I didn't know about the unsafe-perm option ... learned something new :)  Anyway, glad you figured it out and it's working for you.
Reply all
Reply to author
Forward
0 new messages