# 'colors' error message on google-cloud-datastore-tutorial

**URL:** <https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098>\
**Category:** Cloud\
**Created:** [August 5, 2017, 9:11pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098 "2017-08-05T21:11:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 5, 2017, 9:11pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/1 "2017-08-05T21:11:15Z")

</div>

Hello,

I am working to get the google-cloud-datastore-tutorial running but have hit a wall that I can’t seem to get around. when running the `node tutorial.js` I get the below error message:

```cpp
brain:~ Zeytin$ npm install
brain:~ Zeytin$ node tutorial.js
module.js:487
    throw err;
    ^

Error: Cannot find module 'colors'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/Zeytin/tutorial.js:1:76)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

```

I think maybe because I am in the wrong cd? @kennethlimcp sorry to bug you with this but you do know my situation (or last one) rather well.

Any thoughts on whats going on?

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 1:19am UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/2 "2017-08-07T01:19:44Z")

</div>

Which tutorial is that? Have a link?

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 1:39am UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/3 "2017-08-07T01:39:03Z")

</div>

Hi @kennethlimcp

Thank you for the reply! I am working to store data from the SHT10 temperature and humidity on the google cloud. I tried ThingSpeak but was unsuccessful with the setup and now am trying google cloud but am still having trouble. I really am a noob:( The link is below for the tutorial I was working on.

[https://github.com/spark/google-cloud-datastore-tutorial](https://github.com/spark/google-cloud-datastore-tutorial)

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 1:39am UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/4 "2017-08-07T01:39:46Z")

</div>

Did you do a `npm install` in that directory containing all the project files? Was there any error?

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 1:46am UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/5 "2017-08-07T01:46:22Z")

</div>

below is a screenshot of the files in the ~Zeytin directory which I believe is where the `npm install` is taking place?

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/a/a6f201ef411998b501deaaabd6fe2cb3303587e4.png)

This is what I get back after I run the commands:

```cpp
brain:~ Zeytin$ npm install
brain:~ Zeytin$ node tutorial.js
module.js:487
    throw err;
    ^

Error: Cannot find module 'colors'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/Zeytin/tutorial.js:1:76)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3) 

```

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 3:34am UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/6 "2017-08-07T03:34:51Z")

</div>

You will want to be in the `cloud-google-datastore-tutorial` folder.

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 2:02pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/7 "2017-08-07T14:02:05Z")

</div>

Hi @kennethlimcp

Ok, I cd to the cloud-google-datastore-tutorial folder and used the `npm install` command but it gives me the same errors as I had gotten before when trying to install the particle-cli. See below.

```
brain:google-cloud-datastore-tutorial Zeytin$ npm install
npm WARN deprecated google-cloud@0.40.0: The google-cloud meta-package is not recommended; install individual packages.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/Cellar/node/8.2.1/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v8.2.1
npm ERR! npm v3.10.10

npm ERR! Invalid name: "@google-cloud/common"
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR! /Users/Zeytin/google-cloud-datastore-tutorial/npm-debug.log

```

I don’t know why but I cannot get anything to work correctly. Is it the fact that Im on a mac or just because Im new to all of this? I follow all of the tutorials exactly as they say!

Grrr…

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 2:08pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/8 "2017-08-07T14:08:51Z")

</div>

Works fine on my Mac **but** using `v6.x.x` of nodeJS.

Install nvm manager which allows you to switch between nodeJS versions.

```auto
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash

```

Then try doing this:

```auto
nvm install v6

nvm use v6

rm -rf node_modules

sudo npm install

```

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 2:13pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/9 "2017-08-07T14:13:06Z")

</div>

Hey so here is what happened!

> brain:google-cloud-datastore-tutorial Zeytin$ rm -rf node\_modules  
> brain:google-cloud-datastore-tutorial Zeytin$ sudo npm install  
> Password:  
> npm WARN deprecated google-cloud@0.40.0: The google-cloud meta-package is not recommended; install individual packages.  
> npm ERR! Darwin 16.6.0  
> npm ERR! argv "/usr/local/Cellar/node/8.2.1/bin/node" "/usr/local/bin/npm" "install"  
> npm ERR! node v8.2.1  
> npm ERR! npm v3.10.10

> npm ERR! Invalid name: "@google-cloud/bigquery"  
> npm ERR!  
> npm ERR! If you need help, you may report this error at:  
> npm ERR! [https://github.com/npm/npm/issues](https://github.com/npm/npm/issues)

> npm ERR! Please include the following file with any support request:  
> npm ERR! /Users/Zeytin/google-cloud-datastore-tutorial/npm-debug.log

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 2:13pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/10 "2017-08-07T14:13:18Z")

</div>

See above updated post.

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 2:14pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/12 "2017-08-07T14:14:23Z")

</div>

> [@kennethlimcp](#):
>
> nvm install v6

```
brain:google-cloud-datastore-tutorial Zeytin$ nvm install v6
-bash: nvm: command not found

```

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 2:15pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/13 "2017-08-07T14:15:10Z")

</div>

Please read and follow the full instruction above.

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 2:18pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/14 "2017-08-07T14:18:55Z")

</div>

oh sorry I missed the first part.

You are going to hate me but I have no idea how to install that. Do I enter that link into my terminal and under the same directory as I am in now?

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 2:20pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/15 "2017-08-07T14:20:01Z")

</div>

That’s correct.

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 2:22pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/16 "2017-08-07T14:22:24Z")

</div>

> [@kennethlimcp](#):
>
> nvm install v6

got it.. ok here is what happened. I stopped at `nvm install v6` because I got the command not found reply

```
brain:google-cloud-datastore-tutorial Zeytin$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh1 | bash
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 15 100 15 0 0 103 0 --:--:-- --:--:-- --:--:-- 104
bash: line 1: 404:: command not found
brain:google-cloud-datastore-tutorial Zeytin$ nvm install v6
-bash: nvm: command not found

```

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 2:24pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/17 "2017-08-07T14:24:02Z")

</div>

It’s the issue with the command have an extra number:

Try this:

```auto
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash

```

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 2:27pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/18 "2017-08-07T14:27:34Z")

</div>

ok...

> brain:google-cloud-datastore-tutorial Zeytin$ curl -o- [https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh](https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh) | bash  
> % Total % Received % Xferd Average Speed Time Time Time Current  
> Dload Upload Total Spent Left Speed  
> 100 11699 100 11699 0 0 85427 0 --:--:-- --:--:-- --:--:-- 86022  
> =\> Downloading nvm from git to '/Users/Zeytin/.nvm'  
> =\> Cloning into '/Users/Zeytin/.nvm'...  
> remote: Counting objects: 6495, done.  
> remote: Total 6495 (delta 0), reused 0 (delta 0), pack-reused 6495  
> Receiving objects: 100% (6495/6495), 1.94 MiB | 0 bytes/s, done.  
> Resolving deltas: 100% (4026/4026), done.
> 
> - (HEAD detached at v0.33.2)  
> master  
> =\> Compressing and cleaning up git repository  
> Counting objects: 6495, done.  
> Delta compression using up to 8 threads.  
> Compressing objects: 100% (6451/6451), done.  
> Writing objects: 100% (6495/6495), done.  
> Total 6495 (delta 4285), reused 2001 (delta 0)

> =\> Appending nvm source string to /Users/Zeytin/.bash\_profile  
> =\> Appending bash\_completion source string to /Users/Zeytin/.bash\_profile  
> npm ERR! extraneous: ansi@0.2.1 /usr/local/lib/node\_modules/npm/node\_modules/ansi  
> npm ERR! extraneous: block-stream@0.0.7 /usr/local/lib/node\_modules/npm/node\_modules/block-stream  
> npm ERR! extraneous: call-limit@1.1.0 /usr/local/lib/node\_modules/npm/node\_modules/call-limit  
> npm ERR! extraneous: char-spinner@1.0.1 /usr/local/lib/node\_modules/npm/node\_modules/char-spinner  
> npm ERR! extraneous: child-process-close@0.1.1 /usr/local/lib/node\_modules/npm/node\_modules/child-process-close  
> npm ERR! extraneous: chmodr@0.1.0 /usr/local/lib/node\_modules/npm/node\_modules/chmodr  
> npm ERR! extraneous: detect-indent@5.0.0 /usr/local/lib/node\_modules/npm/node\_modules/detect-indent  
> npm ERR! extraneous: JSONStream@1.3.1 /usr/local/lib/node\_modules/npm/node\_modules/JSONStream  
> npm ERR! extraneous: lazy-property@1.0.0 /usr/local/lib/node\_modules/npm/node\_modules/lazy-property  
> npm ERR! extraneous: libnpx@9.2.0 /usr/local/lib/node\_modules/npm/node\_modules/libnpx  
> npm ERR! extraneous: lodash.\_baseindexof@3.1.0 /usr/local/lib/node\_modules/npm/node\_modules/lodash.\_baseindexof  
> npm ERR! extraneous: lodash.\_bindcallback@3.0.1 /usr/local/lib/node\_modules/npm/node\_modules/lodash.\_bindcallback  
> npm ERR! extraneous: lodash.\_cacheindexof@3.0.2 /usr/local/lib/node\_modules/npm/node\_modules/lodash.\_cacheindexof  
> npm ERR! extraneous: lodash.\_createcache@3.1.2 /usr/local/lib/node\_modules/npm/node\_modules/lodash.\_createcache  
> npm ERR! extraneous: lodash.restparam@3.6.1 /usr/local/lib/node\_modules/npm/node\_modules/lodash.restparam  
> npm ERR! extraneous: minimatch@0.3.0 /usr/local/lib/node\_modules/npm/node\_modules/minimatch  
> npm ERR! extraneous: npmconf@1.0.1 /usr/local/lib/node\_modules/npm/node\_modules/npmconf  
> npm ERR! extraneous: pacote@2.7.38 /usr/local/lib/node\_modules/npm/node\_modules/pacote  
> npm ERR! extraneous: sorted-union-stream@2.1.3 /usr/local/lib/node\_modules/npm/node\_modules/sorted-union-stream  
> npm ERR! extraneous: uuid@3.1.0 /usr/local/lib/node\_modules/npm/node\_modules/uuid  
> npm ERR! extraneous: worker-farm@1.4.1 /usr/local/lib/node\_modules/npm/node\_modules/worker-farm  
> npm ERR! invalid: normalize-package-data@0.2.13 /usr/local/lib/node\_modules/npm/node\_modules/read-package-json/node\_modules/normalize-package-data  
> npm ERR! missing: semver@2, required by normalize-package-data@0.2.13  
> npm ERR! extraneous: github-url-from-git@1.1.1 /usr/local/lib/node\_modules/npm/node\_modules/github-url-from-git  
> npm ERR! extraneous: github-url-from-username-repo@0.1.0 /usr/local/lib/node\_modules/npm/node\_modules/github-url-from-username-repo  
> npm ERR! extraneous: mime@1.2.11 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/mime  
> npm ERR! extraneous: performance-now@0.2.0 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/performance-now  
> npm ERR! extraneous: async@0.2.9 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/form-data/node\_modules/async  
> npm ERR! invalid: combined-stream@0.0.4 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/form-data/node\_modules/combined-stream  
> npm ERR! extraneous: delayed-stream@0.0.5 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/form-data/node\_modules/combined-stream/node\_modules/delayed-stream  
> npm ERR! extraneous: ajv@4.11.8 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/har-validator/node\_modules/ajv  
> npm ERR! extraneous: har-schema@1.0.5 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/har-validator/node\_modules/har-schema  
> npm ERR! extraneous: asn1@0.1.11 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/http-signature/node\_modules/asn1  
> npm ERR! extraneous: ctype@0.5.2 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/http-signature/node\_modules/ctype  
> npm ERR! extraneous: assert-plus@1.0.0 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/http-signature/node\_modules/jsprim/node\_modules/assert-plus  
> npm ERR! extraneous: punycode@1.2.3 /usr/local/lib/node\_modules/npm/node\_modules/request/node\_modules/tough-cookie/node\_modules/punycode  
> npm ERR! invalid: readable-stream@1.0.24 /usr/local/lib/node\_modules/npm/node\_modules/sha/node\_modules/readable-stream  
> npm ERR! invalid: ansi-regex@3.0.0 /usr/local/lib/node\_modules/npm/node\_modules/strip-ansi/node\_modules/ansi-regex  
> =\> You currently have modules installed globally with `npm`. These will no  
> =\> longer be linked to the active version of Node when you install a new node  
> =\> with `nvm`; and they may (depending on how you construct your `$PATH`)  
> =\> override the binaries of modules installed with `nvm`:

> /usr/local/lib  
> ├── bootstrap@4.0.0-alpha.6  
> ├── colors@1.1.2  
> ├── json@9.0.6  
> ├── particle-cli@1.23.1  
> └── serialport@5.0.0  
> =\> If you wish to uninstall them at a later point (or re-install them under your  
> =\> `nvm` Nodes), you can remove them from the system Node as follows:

> ```
> $ nvm use system
> $ npm uninstall -g a_module
> 
> ```

> =\> Close and reopen your terminal to start using nvm or run the following to use it now:

> export NVM\_DIR="$HOME/.nvm"  
> [-s "$NVM\_DIR/nvm.sh"] && . "$NVM\_DIR/nvm.sh" # This loads nvm  
> [-s "$NVM\_DIR/bash\_completion"] && . "$NVM\_DIR/bash\_completion" # This loads nvm bash\_completion  
> brain:google-cloud-datastore-tutorial Zeytin$ nvm install v6  
> -bash: nvm: command not found

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 2:28pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/19 "2017-08-07T14:28:51Z")

</div>

> [@Clifton](#):
>
> =\> Close and reopen your terminal to start using nvm or run the following to use it now:

did you do this?

---

<div class="post-metadata">

**Author:** ![Clifton](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Clifton](https://community.particle.io/u/Clifton)\
**Post date:** [August 7, 2017, 2:34pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/20 "2017-08-07T14:34:34Z")

</div>

> [@kennethlimcp](#):
>
> sudo npm install

just did... what it spit out is really really long. Is there a way to post a file vs posting the long reply?

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [August 7, 2017, 2:35pm UTC](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098/21 "2017-08-07T14:35:26Z")

</div>

you can use the following syntax

```auto

```

paste logs here

```auto

```

[Next page](https://community.particle.io/t/colors-error-message-on-google-cloud-datastore-tutorial/35098.md?page=2)
