# Node Module not found

**URL:** <https://discuss.circleci.com/t/node-module-not-found/5545>\
**Category:** Programming Languages\
**Tags:** nodejs\
**Created:** [August 5, 2016, 4:13am UTC](https://discuss.circleci.com/t/node-module-not-found/5545 "2016-08-05T04:13:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FeliciousX](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/feliciousx/32/13632_2.png) [@FeliciousX](https://discuss.circleci.com/u/FeliciousX)\
**Post date:** [August 5, 2016, 4:13am UTC](https://discuss.circleci.com/t/node-module-not-found/5545/1 "2016-08-05T04:13:44Z")

</div>

**FIXED!**  
**Building without cache solved this problem.**

I’m trying to integrate CircleCI to this [open source project](https://github.com/FeliciousX/xstream-boilerplate) .  
It’s using:-

- webpack to bundle the js
- babel to transpile es2015 to es5
- Mocha + power-assert - unit testing
- Nightwatch + Mocha - integration testing

When running the unit-test, it will say `@cycle/xstream-adapter` module not found.  
I tried running locally, I even tried it on Travis CI. It works.

So I SSH-ed in and run the node cli on the repo directory to test. `require('@cycle/xstream-adapter')` and sure enough it cant be found.

I ran `npm list | grep @cycle` and I see xstream-adapter is a dependency for `@cycle/dom` so normally it would still work

Next I manually `npm install @cycle/xstream-adapter` and manually run the `npm run unit-test`

This time it is able to find the xstream adapter but have other errors. Shown down below.

I am starting to think that there’s something wrong here with how node resolve the modules in CircleCI ?  
Anyone experienced anything similar before?

```
> xstream-boilerplate@0.1.1 unit-test /home/ubuntu/xstream-boilerplate
> cross-env NODE_PATH=./src BABEL_ENV=development mocha -r babel-register

/home/ubuntu/xstream-boilerplate/node_modules/babel-core/lib/transformation/plugin.js:138
      throw new Error(messages.get("pluginInvalidProperty", loc, i, key));
      ^

Error: Plugin 1 specified in "/home/ubuntu/xstream-boilerplate/.babelrc.env.development" provided an invalid property of "__esModule"
    at Plugin.init (/home/ubuntu/xstream-boilerplate/node_modules/babel-core/lib/transformation/plugin.js:138:13)
    at Function.normalisePlugin (/home/ubuntu/xstream-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:147:12)
    at /home/ubuntu/xstream-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:181:30
    at Array.map (native)
    at Function.normalisePlugins (/home/ubuntu/xstream-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:153:20)
    at OptionManager.mergeOptions (/home/ubuntu/xstream-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:245:36)
    at OptionManager.init (/home/ubuntu/xstream-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:360:12)
    at compile (/home/ubuntu/xstream-boilerplate/node_modules/babel-register/lib/node.js:103:45)
    at loader (/home/ubuntu/xstream-boilerplate/node_modules/babel-register/lib/node.js:148:14)
    at Object.require.extensions.(anonymous function) [as .js] (/home/ubuntu/xstream-boilerplate/node_modules/babel-register/lib/node.js:158:7)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at /home/ubuntu/xstream-boilerplate/node_modules/mocha/lib/mocha.js:220:27
    at Array.forEach (native)
    at Mocha.loadFiles (/home/ubuntu/xstream-boilerplate/node_modules/mocha/lib/mocha.js:217:14)
    at Mocha.run (/home/ubuntu/xstream-boilerplate/node_modules/mocha/lib/mocha.js:485:10)
    at Object.<anonymous> (/home/ubuntu/xstream-boilerplate/node_modules/mocha/bin/_mocha:405:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
    at run (bootstrap_node.js:352:7)
    at startup (bootstrap_node.js:144:9)
    at bootstrap_node.js:467:3
```

---

<div class="post-metadata">

**Author:** ![FeliciousX](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/feliciousx/32/13632_2.png) [@FeliciousX](https://discuss.circleci.com/u/FeliciousX)\
**Post date:** [August 5, 2016, 4:28am UTC](https://discuss.circleci.com/t/node-module-not-found/5545/2 "2016-08-05T04:28:16Z")

</div>

Hmm after clearing cache and editing my circle.yml it worked.

Now to make selenium driver run in the background…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:33am UTC](https://discuss.circleci.com/t/node-module-not-found/5545/3 "2018-06-18T11:33:06Z")

</div>


