Cannot find module '../features.json'
See original GitHub issue$ jake compile --trace
⯠Compiling common...
⯠Compiling full...
⯠Compiling mobile...
[18:52:44] Using gulpfile ~/projects/desktop/gulpfile.js
[18:52:44] Starting 'mobile:clean'...
[18:52:44] Finished 'mobile:clean' after 4.54 ms
[18:52:44] Starting 'mobile:static'...
[18:52:44] Using gulpfile ~/projects/desktop/gulpfile.js
[18:52:44] Starting 'full:clean'...
[18:52:44] Starting 'mobile:styles'...
[18:52:44] Finished 'full:clean' after 3.5 ms
[18:52:44] Starting 'full:static'...
[18:52:44] Using gulpfile ~/projects/desktop/gulpfile.js
[18:52:44] Starting 'common:clean'...
[18:52:44] Starting 'full:styles'...
[18:52:44] Finished 'common:clean' after 18 ms
[18:52:44] Starting 'common:static'...
[18:52:44] Starting 'common:styles'...
[18:52:44] 'mobile:styles' errored after 163 ms
[18:52:44] Error: Cannot find module '../features.json'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/kslimani/projects/desktop/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/caniuse-api/dist/index.js:10:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
[18:52:44] 'full:styles' errored after 160 ms
[18:52:44] Error: Cannot find module '../features.json'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/kslimani/projects/desktop/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/caniuse-api/dist/index.js:10:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
[18:52:44] Finished 'full:static' after 188 ms
jake aborted.
Error: Process exited with error.
at api.fail (/usr/lib/node_modules/jake/lib/api.js:336:18)
at null.<anonymous> (/usr/lib/node_modules/jake/lib/utils/index.js:136:9)
at emit (events.js:98:17)
at ChildProcess.<anonymous> (/usr/lib/node_modules/jake/lib/utils/index.js:219:20)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
[18:52:44] 'common:styles' errored after 176 ms
[18:52:44] Error: Cannot find module '../features.json'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/kslimani/projects/desktop/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/caniuse-api/dist/index.js:10:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
kslimani@df3:~/projects/desktop (master)$ [18:52:44] Finished 'mobile:static' after 236 ms
[18:52:44] Finished 'common:static' after 287 ms
Issue Analytics
- State:
- Created 9 years ago
- Comments:38
Top Results From Across the Web
require a json file results in an error: Cannot find module
I had a similar problem when trying to import json from a file in a typescript project. I used
Read more >Solved: "Cannot find module 'x.json'" TypeScript Error
When trying to import a JSON file in your TypeScript project, you may see the following error: Cannot find module 'my-json-file.json'.
Read more >Fixing The "Cannot Find Module" Error In TypeScript
In this article, I explain how to fix "cannot find module" in TypeScript. Install the package. Re-install the dependencies.
Read more >Error: cannot find module [Node npm Error Solved]
How to Fix the "cannot find module" Error · delete the node modules folder by running rm -rf node_modules · delete package.lock.json file...
Read more >Error: Cannot find module in JavaScript [SOLVED]
We can solve Error: Cannot find module by installing the missing module. We can use npm tool to install the mising module.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was having same issue for different reason. If you install with
npm i --ignore-scripts
you will also get this error and need to manually run the postinstall hook after installing. Maybe this helps someone else doing the same.I have had the same issues with Node v4.2.1 on Ubuntu 14.04. I had to manually run
node dist/generate-features.js
in order for this to stop happening.