Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on npm start #15

Closed
catfriend opened this issue Nov 2, 2015 · 21 comments
Closed

error on npm start #15

catfriend opened this issue Nov 2, 2015 · 21 comments

Comments

@catfriend
Copy link

snapkite-engine: (master)$ npm start

snapkite-engine@0.1.2 start /Users/elizabethakari/practice_apps/first_react/snapkite-engine
node app.js

[Snapkite][Socket] Listening on port 3000
module.js:338
throw err;
^

Error: Cannot find module '../filters/snapkite-filter-is-possibly-sensitive'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at /Users/elizabethakari/practice_apps/first_react/snapkite-engine/controllers/twitter.js:67:20
at Array.forEach (native)
at isValidTweet (/Users/elizabethakari/practice_apps/first_react/snapkite-engine/controllers/twitter.js:65:30)
at null. (/Users/elizabethakari/practice_apps/first_react/snapkite-engine/controllers/twitter.js:93:9)
at emitOne (events.js:77:13)
at emit (events.js:169:7)

npm ERR! Darwin 13.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! code ELIFECYCLE
npm ERR! snapkite-engine@0.1.2 start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the snapkite-engine@0.1.2 start script 'node app.js'.
npm ERR! This is most likely a problem with the snapkite-engine package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls snapkite-engine
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/elizabethakari/practice_apps/first_react/snapkite-engine/npm-debug.log

@fedosejev
Copy link
Owner

@catfriend have you forgot to install snapkite-filter-is-possibly-sensitive filter?

Error: Cannot find module '../filters/snapkite-filter-is-possibly-sensitive'

@catfriend
Copy link
Author

No.

from terminal:

snapkite-engine: (master)$ git clone git@github.com:Snapkite/snapkite-filter-is-possibly-sensitive.git
Cloning into 'snapkite-filter-is-possibly-sensitive'...
remote: Counting objects: 15, done.
remote: Total 15 (delta 0), reused 0 (delta 0), pack-reused 15
Receiving objects: 100% (15/15), done.
Resolving deltas: 100% (3/3), done.
Checking connectivity... done.

It also shows up in sublime.

Elizabeth AKA catfriend

Date: Sun, 1 Nov 2015 16:35:35 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend have you forgot to install snapkite-filter-is-possibly-sensitive filter?

Error: Cannot find module '../filters/snapkite-filter-is-possibly-sensitive'


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend did you clone it into snapkite-engine/filters/ directory?

@catfriend
Copy link
Author

Inside snapkite-engine:

app.js
config.json
controllers
example.config.json
filters
LICENSE
models
node_modules
npm-debug.log
package.json
README.md
snapkite-engine-logo.png
snapkite-filter-has-mobile-photo
snapkite-filter-has-text
snapkite-filter-is-possibly-sensitive
snapkite-filter-is-retweet
utils.js

Date: Sun, 1 Nov 2015 17:08:27 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend did you clone it into snapkite-engine/filters/ directory?


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend snapkite-filter-has-mobile-photo, snapkite-filter-has-text, snapkite-filter-is-possibly-sensitive, snapkite-filter-is-retweet should go inside of filters directory.

@fedosejev
Copy link
Owner

@catfriend did that fix it?

@catfriend
Copy link
Author

That eliminated the error on npm start, yes. However, then following what I think is your instruction to ~/snapterest/ fails for me (I had named this app first_react instead of snapterest, so I am subbing first_react for snapterest. I can change it to snapterest if necessary; if so, will I need to obtain new twitter credentials?). Am I supposed to create the source and build folders directly in my text editor (sublime), or from the command line? It's not working from the command line, as you can see below. Am I doing something wrong?

snapkite-engine: (master)$ ~/first_react/
-bash: /Users/elizabethakari/first_react/: No such file or directory
snapkite-engine: (master)$ cd first_react
-bash: cd: first_react: No such file or directory
snapkite-engine: (master)$

Am I on the right track? This is what my structure looks like now (cut and paste from finder):

first_react folder:

npm-debug.log
snapkite-engine

inside snapkite-engine folder:

app.js
config.json
controllers
example.config.json
filters
(these are the individual filter folders inside the filters folder)
README.md
snapkite-filter-has-mobile-photo
snapkite-filter-has-text
snapkite-filter-is-possibly-sensitive
snapkite-filter-is-retweet
LICENSE
models
node_modules
npm-debug.log
package.json
README.md
snapkite-engine-logo.png
utils.js

Thanks, Elizabeth

BTW I am on PST; west coast US.

Date: Mon, 2 Nov 2015 07:36:44 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend did that fix it?


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend I would recommend to follow book's instructions as closely as possible, without renaming snapterest to fist_react. Take a look at https://github.com/fedosejev/react-essentials/tree/master/code/chapter01/snapterest directory - it has the project structure described in the book. This could serve as a good starting point.

@catfriend
Copy link
Author

I just looked at that. Snapkite is not in there at all. I don't understand. Where is that supposed to be?

Date: Mon, 2 Nov 2015 13:07:30 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend I would recommend to follow book's instructions as closely as possible, without renaming snapterest to fist_react. Take a look at https://github.com/fedosejev/react-essentials/tree/master/code/chapter01/snapterest directory - it has the project structure described in the book. This could serve as a good starting point.


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend here it is: https://github.com/fedosejev/react-essentials/tree/master/code/chapter01

Note that snapkite-engine is a separate web application that should be cloned into your home directory, so that you could find it here: ~/snapkite-engine

Then you need to create:

  • ~/snapterest/source/
  • ~/snapterest/build/

@catfriend
Copy link
Author

So it's not part of the app at all?

Date: Mon, 2 Nov 2015 13:17:39 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend here it is: https://github.com/fedosejev/react-essentials/tree/master/code/chapter01

Note that snapkite-engine is a separate web application that should be cloned into your home directory, so that you could find it here: ~/snapkite-engine

Then you need to create:

~/snapterest/source/
~/snapterest/build/


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend yes, it's a separate app that Snapterest uses to receive the latest photos from Twitter.

@catfriend
Copy link
Author

It looks like what I need to do is throw everything out and start again. I thought I was following the directions exactly, except for naming the app first_react instead of snapterest, but if I'm understanding this email chain somehow I have missed entirely the whole snapkite thing. I'm not entirely certain where you want it. I have many, many folders and subfolders on my computer. I typically keep all of my practice apps in one folder, which is where I started a folder for this app. Apparently this needs to float around loose, as does snapkite.

Date: Mon, 2 Nov 2015 13:25:19 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend yes, it's a separate app that Snapterest uses to receive the latest photos from Twitter.


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend it's really up to you where you're going to create snapkite-engine and snapterest folders. In the book I give examples that assume that they're in your home directory, but feel free to modify those to fit your project structure.

I think it might be easier to follow the exact instructions from the book to avoid unnecessary errors.

@catfriend
Copy link
Author

I thought I was following the exact instructions from the book, except for the naming. Even looking back at the pages now, it is not clear to me that snapkite engine is not part of the app.

Date: Mon, 2 Nov 2015 13:36:09 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend it's really up to you where you're going to create snapkite-engine and snapterest folders. In the book I give examples that assume that they're in your home directory, but feel free to modify those to fit your project structure.

I think it might be easier to follow the exact instruction from the book to avoid unnecessary errors.


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend take another look at pages 6 and 7. They explain snapkite-engine and how (and where) to install it.

Snapkite Engine is not part of Snapterest, but it's a part of the overall solution, because it provides data that Snapterest displays.

@catfriend
Copy link
Author

I have the ebook version on my laptop, and I've enlarged the print. For me, the Filtering Data With Snapkite Engine begins on page 60. Pages 6 and 7 are still the table of contents.

Date: Mon, 2 Nov 2015 13:44:17 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend take another look at pages 6 and 7. They explain snapkite-engine and how (and where) to install it.

Snapkite Engine is not part of Snapterest, but it's a part of the overall solution, because it provides data that Snapterest displays.


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend in Chapter 1 find Filtering data with Snapkite Engine - that section should clarify things.

@catfriend
Copy link
Author

Yes, that begins on p 60, as I just mentioned. I have now read it a few times. If you believe that it is clear, then we are going to have to agree to disagree on this point, because it's not clear to me.

Date: Mon, 2 Nov 2015 13:58:01 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend in Chapter 1 find Filtering data with Snapkite Engine - that section should clarify things.


Reply to this email directly or view it on GitHub.

@fedosejev
Copy link
Owner

@catfriend sorry to hear that. I hope someone else will explain it better.

@catfriend
Copy link
Author

I have another question. I threw out my previous version, and started again. Everything seemed to be going fine. Chapter 2, Building With Gulp.js. I followed the instructions for installing Gulp, no problem. The next instruction is npm install --save-dev babelify. No problem. From my terminal: snapterest:$ npm install --save-dev babelify Next up, npm install --save-dev vinyl-source-stream. Again, no problem (from terminal: snapterest:$ npm install --save-dev vinyl-source-stream). I then ran Gulp as instructed, and got the expected result. At this point everything was working as expected. I added the current version of React, the code to app.js, and ran Gulp. I created the element, and had the expected html on screen, but not “


in the developer tools. I continued, but the text is not appearing on screen as expected. At the end of the chapter I double checked mine against your example, and while the code I typed matched, there is a major file discrepancy:

build
gulpfile.js
node_modules
package.json
source

I have the node modules folder in my app, whereas your example does not. Inside my node modules folder:

babelify
browserify
gulp
react
react-dom
vinyl-source-stream

I followed the instructions. If these are not supposed to be in the snapterest folder, and since they're not in yours I'm gathering that is not the case, then where are they supposed to be? How should I proceed?

Date: Mon, 2 Nov 2015 14:15:26 -0800
From: notifications@github.com
To: react-essentials@noreply.github.com
CC: eakari@live.com
Subject: Re: [react-essentials] error on npm start (#15)

@catfriend sorry to hear that. I hope someone else will explain it better.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants