Navigation Menu

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

Cannot find module '../features.json' #25

Closed
kud opened this issue Mar 5, 2015 · 38 comments
Closed

Cannot find module '../features.json' #25

kud opened this issue Mar 5, 2015 · 38 comments

Comments

@kud
Copy link

kud commented Mar 5, 2015

$ 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
@kud
Copy link
Author

kud commented Mar 5, 2015

This is on Linux, with node 10.33

@MoOx
Copy link
Collaborator

MoOx commented Mar 5, 2015

Can you try to uninstall then reinstall the package ?
This seems like something didn't finish the postinstall of this package.

@MoOx
Copy link
Collaborator

MoOx commented Mar 30, 2015

Closing since nobody complain for this issue in a month.

@MoOx MoOx closed this as completed Mar 30, 2015
@fuunnx
Copy link

fuunnx commented Sep 23, 2015

Hi, I have a similar issue with my installation of caniuse-api (via gulp-cssnext) :

geraud:APP imac$ gulp
[11:24:39] Requiring external module babel-core/register
module.js:338
    throw err;
    ^
Error: Cannot find module '../features'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/imac/workspace/RECTOR/JEU THERMOPREDALLE/APP/node_modules/cssnext/node_modules/caniuse-api/dist/index.js:19:32)
    at Module._compile (module.js:460:26)
    at Module._extensions..js (module.js:478:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/imac/workspace/RECTOR/JEU THERMOPREDALLE/APP/node_modules/babel-core/lib/api/register/node.js:214:7)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/imac/workspace/RECTOR/JEU THERMOPREDALLE/APP/node_modules/cssnext/dist/index.js:15:19)
    at Module._compile (module.js:460:26)
    at Module._extensions..js (module.js:478:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/imac/workspace/RECTOR/JEU THERMOPREDALLE/APP/node_modules/babel-core/lib/api/register/node.js:214:7)

Requiring ./generate-features before ../feature at l.20 seems to fix it :

require("./generate-features");

@MoOx
Copy link
Collaborator

MoOx commented Sep 25, 2015

Your install has probably not been done correctly. Please try to uninstall then reinstall cssnext.

@fuunnx
Copy link

fuunnx commented Sep 30, 2015

Working 👍

@villimagg
Copy link

I can confirm that this affects me also.
I've got Linux and Node v4.1.1, NPM v3.3.7.

When using Gulp and cssnext I get the exact same error message as Funx got (see above).
By adding require("./generate-features"); before var features = _interopRequire(require("../features")); at line 19 in node_modules/caniuse-api/dist/index.js this error disappears.

For the record: Uninstalling and reinstalling didn't solve anything.

@MoOx
Copy link
Collaborator

MoOx commented Oct 9, 2015

Just try to reinstall.

@villimagg
Copy link

Reinstalling didn't do anything. Didn't I say that?

On Fri, Oct 9, 2015 at 6:31 PM Maxime Thirouin notifications@github.com
wrote:

Just try to reinstall.


Reply to this email directly or view it on GitHub
#25 (comment).

@MoOx
Copy link
Collaborator

MoOx commented Oct 10, 2015

There is more than 500 downloads per day and it's working for everyone, so I recommend you to clean your npm cache and try again.
What version of node are you using?

@villimagg
Copy link

Node version 4.1.1

On lau, okt 10, 2015 at 10:06 EH, Maxime Thirouin
notifications@github.com wrote:

There is more than 500 downloads per day and it's working for
everyone, so I recommend you to clean your npm cache and try again.
What version of node are you using?


Reply to this email directly or view it on GitHub.

@steverydz
Copy link

I'm getting this exact same problem using this via cssnext. I've uninstalled then reinstalled several times, as well as cleaning my npm cache. Using Node version 4.1.2.

@MoOx
Copy link
Collaborator

MoOx commented Oct 11, 2015

Seems related to #29.
Can you provide output for you npm install?

@steverydz
Copy link

Sure:

npm WARN deprecated css-list@0.1.3: Deprecated.
npm WARN engine img-stats@0.4.2: wanted: {"node":"~0.10"} (current: {"node":"4.1.2","npm":"3.3.7"})

> fsevents@1.0.2 install /Users/steverydz/Sites/postcss-demo/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/steverydz/Sites/postcss-demo/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote

> caniuse-api@1.3.2 postinstall /Users/steverydz/Sites/postcss-demo/node_modules/caniuse-api
> node -e "require('shelljs/global');if(test('-d', 'dist'))exec('node dist/generate-features.js')"

@MoOx
Copy link
Collaborator

MoOx commented Oct 12, 2015

Can you try this and reports what is happening:

$ cd node_modules/caniuse-api
$ node -e "require('shelljs/global');if(test('-d', 'dist'))exec('node dist/generate-features.js')"

@villimagg
Copy link

caniuse-api

I also tried with require("./generate-features"); commented out at line 19 in node_modules/caniuse-api/dist/index.js and got the same results as the picture shows.

@MoOx
Copy link
Collaborator

MoOx commented Oct 12, 2015

It seems you have the required file node_modules/caniuse-api/feature.js. That's weird you get Cannot find module '../features.json'. Not sure what is the problem here...
Could you make a minimal repo to reproduce the issue please?

@villimagg
Copy link

Yes, but it'l have to be in a few days. I'll probably be able to do it be
the end of the week. Talk later then.

On Mon, Oct 12, 2015 at 9:09 AM Maxime Thirouin notifications@github.com
wrote:

It seems you have the required file node_modules/caniuse-api/feature.js.
That's weird you get Cannot find module '../features.json'. Not sure what
is the problem here...
Could you make a minimal repo to reproduce the issue please?


Reply to this email directly or view it on GitHub
#25 (comment).

@jclem
Copy link

jclem commented Oct 16, 2015

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.

@MoOx
Copy link
Collaborator

MoOx commented Oct 16, 2015

Maybe the test using shelljs fail for some reason. I will try to add an echo if the test fail, so we will get proper output for debugging.

@MoOx MoOx reopened this Oct 16, 2015
@MoOx
Copy link
Collaborator

MoOx commented Oct 18, 2015

I released a new version (1.4.0) which may fix things or at least should helps to see if generation is ok or not. Please let me know if that helps.

@villimagg
Copy link

It works fine now. Tried two test projects. One using gulp-cssnext, and the other using just cssnext and both worked fine.

Thank you!

@MoOx MoOx closed this as completed Oct 19, 2015
@admitriyev
Copy link

FYI I had the same issue running it in Jenkins, and I noticed that the directory name in the error message was cut off after the space. My workspace directory was named "ci - foobar" and it looked like it did not like the space in the name. I renamed it to "ci-foobar" without spaces and it started working.

@MoOx
Copy link
Collaborator

MoOx commented Nov 22, 2015

hum... Interesting. so you cwd included a space and without it, no bug ?

@admitriyev
Copy link

@MoOx yes, I believe that's the only thing I changed (renamed the directory) and the bug went away

@KamilLelonek
Copy link

Same problem here.

@MoOx
Copy link
Collaborator

MoOx commented Jan 4, 2016

What is your exact issue?
Can your provide some informations like node/npm versions, output of the npm install etc. Otherwise we cannot help.

@KamilLelonek
Copy link

Yeah, sure.

Operating system: CentOS 7.1
NPM version:      3.5.2
Node version:     v4.2.4
build command:    postcss --local-plugins -c postcss.config.json

and postcss.config.json:

{
  "use": [
    "postcss-import",
    "postcss-nested",
    "cssnext",
    "postcss-discard-comments",
    "cssnano"
  ],
  "input": "_postcss/style.css",
  "output": "build/style.css",
  "autoprefixer": {
    "browsers": [ "> 1%" ]
  },
  "postcss-discard-comments": {
    "removeAll": true
  }
}

package.json:

{
  "dependencies": {
    "browserify": "^12.0.1",
    "caniuse-api": "^1.4.1",
    "cssnano": "^3.4.0",
    "cssnext": "^1.8.4",
    "ellipsize": "0.0.2",
    "jquery": "^2.1.4",
    "pluralize": "^1.2.1",
    "postcss-cli": "^2.3.3",
    "postcss-discard-comments": "^2.0.3",
    "postcss-import": "^7.1.3",
    "postcss-nested": "^1.0.0",
    "uglifyjs": "^2.4.10",
    "url": "^0.11.0",
    "virtual-dom": "^2.1.1"
  }
}

the netire error:

module.js:340
    throw err;
    ^

Error: Cannot find module '../features'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/home/blog/www/shared/node_modules/cssnext/node_modules/caniuse-api/dist/index.js:19:32)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)

@MoOx
Copy link
Collaborator

MoOx commented Jan 4, 2016

You didn't provide the full npm install output

@KamilLelonek
Copy link

npm i
npm WARN deprecated cssnext@1.8.4: cssnext is now postcss-cssnext. cssnext is deprecated. See postcss-cssnext migration guide http://cssnext.io/postcss/
npm WARN optional dep failed, continuing fsevents@1.0.6
npm WARN optional dep failed, continuing fsevents@1.0.6
npm WARN deprecated css-list@0.1.3: Deprecated.
WARN engine img-stats@0.4.2: wanted: {"node":"~0.10"} (current: {"node":"4.2.4","npm":"2.14.12"})
-
> caniuse-api@1.4.1 postinstall /home/blog/www/releases/20160103221023/node_modules/caniuse-api
> node generator.js

caniuse-api: Generation ok
pluralize@1.2.1 node_modules/pluralize

ellipsize@0.0.2 node_modules/ellipsize

url@0.11.0 node_modules/url
├── punycode@1.3.2
└── querystring@0.2.0

watch@0.17.1 node_modules/watch
├── minimist@1.2.0
└── exec-sh@0.2.0 (merge@1.2.0)

uglifyjs@2.4.10 node_modules/uglifyjs
├── async@0.2.10
├── uglify-to-browserify@1.0.2
├── yargs@1.3.3
└── source-map@0.1.34 (amdefine@1.0.0)

jquery@2.1.4 node_modules/jquery

postcss-nested@1.0.0 node_modules/postcss-nested
└── postcss@5.0.14 (js-base64@2.1.9, supports-color@3.1.2, source-map@0.5.3)

postcss-import@7.1.3 node_modules/postcss-import
├── object-assign@4.0.1
├── postcss-message-helpers@2.0.0
├── glob@5.0.15 (path-is-absolute@1.0.0, inherits@2.0.1, once@1.3.3, inflight@1.0.4, minimatch@3.0.0)
├── resolve@1.1.6
└── postcss@5.0.14 (js-base64@2.1.9, supports-color@3.1.2, source-map@0.5.3)

postcss-discard-comments@2.0.3 node_modules/postcss-discard-comments
└── postcss@5.0.14 (js-base64@2.1.9, supports-color@3.1.2, source-map@0.5.3)

postcss-cli@2.3.3 node_modules/postcss-cli
├── neo-async@1.7.2
├── read-file-stdin@0.2.0 (gather-stream@1.0.0)
├── globby@3.0.1 (arrify@1.0.1, object-assign@4.0.1, pify@2.3.0, array-union@1.0.1, pinkie-promise@1.0.0, glob@5.0.15)
├── yargs@3.31.0 (camelcase@2.0.1, window-size@0.1.4, y18n@3.2.0, decamelize@1.1.2, os-locale@1.4.0, string-width@1.0.1, cliui@3.1.0)
├── resolve@1.1.6
├── postcss@5.0.14 (js-base64@2.1.9, supports-color@3.1.2, source-map@0.5.3)
└── chokidar@1.4.2 (path-is-absolute@1.0.0, inherits@2.0.1, glob-parent@2.0.0, async-each@0.1.6, is-binary-path@1.0.1, is-glob@2.0.1, readdirp@2.0.0, anymatch@1.3.0)

virtual-dom@2.1.1 node_modules/virtual-dom
├── browser-split@0.0.1
├── x-is-array@0.1.0
├── x-is-string@0.1.0
├── is-object@1.0.1
├── next-tick@0.2.2
├── error@4.4.0 (string-template@0.2.1, camelize@1.0.0, xtend@4.0.1)
├── ev-store@7.0.0 (individual@3.0.0)
└── global@4.3.0 (process@0.5.2, min-document@2.17.0)

browserify@12.0.1 node_modules/browserify
├── https-browserify@0.0.1
├── tty-browserify@0.0.0
├── htmlescape@1.1.0
├── path-browserify@0.0.0
├── duplexer2@0.1.4
├── punycode@1.4.0
├── browser-resolve@1.11.0
├── constants-browserify@1.0.0
├── string_decoder@0.10.31
├── isarray@0.0.1
├── through2@2.0.0
├── os-browserify@0.1.2
├── process@0.11.2
├── inherits@2.0.1
├── stream-browserify@2.0.1
├── assert@1.3.0
├── defined@1.0.0
├── domain-browser@1.1.7
├── xtend@4.0.1
├── read-only-stream@2.0.0
├── querystring-es3@0.2.1
├── timers-browserify@1.4.2
├── util@0.10.3
├── deps-sort@2.0.0
├── events@1.1.0
├── concat-stream@1.5.1 (typedarray@0.0.6)
├── parents@1.0.1 (path-platform@0.11.15)
├── vm-browserify@0.0.4 (indexof@0.0.1)
├── has@1.0.1 (function-bind@1.0.2)
├── console-browserify@1.1.0 (date-now@0.1.4)
├── shell-quote@1.4.3 (array-filter@0.0.1, array-map@0.0.0, jsonify@0.0.0, array-reduce@0.0.0)
├── readable-stream@2.0.5 (process-nextick-args@1.0.6, util-deprecate@1.0.2, core-util-is@1.0.2)
├── subarg@1.0.0 (minimist@1.2.0)
├── labeled-stream-splicer@2.0.0 (stream-splicer@2.0.0)
├── shasum@1.0.2 (sha.js@2.4.4, json-stable-stringify@0.0.1)
├── stream-http@2.0.2 (builtin-status-codes@1.0.0)
├── buffer@3.6.0 (ieee754@1.1.6, isarray@1.0.0, base64-js@0.0.8)
├── glob@5.0.15 (path-is-absolute@1.0.0, once@1.3.3, inflight@1.0.4, minimatch@3.0.0)
├── JSONStream@1.0.7 (through@2.3.8, jsonparse@1.2.0)
├── browserify-zlib@0.1.4 (pako@0.2.8)
├── resolve@1.1.6
├── syntax-error@1.1.4 (acorn@1.2.2)
├── browser-pack@6.0.1 (umd@3.0.1, combine-source-map@0.7.1)
├── crypto-browserify@3.11.0 (randombytes@2.0.1, create-hmac@1.1.4, pbkdf2@3.0.4, create-hash@1.1.2, diffie-hellman@5.0.0, create-ecdh@4.0.0, browserify-cipher@1.0.0, browserify-sign@4.0.0, public-encrypt@4.0.0)
├── insert-module-globals@7.0.1 (is-buffer@1.1.1, combine-source-map@0.7.1, lexical-scope@1.2.0)
└── module-deps@4.0.5 (stream-combiner2@1.1.1, detective@4.3.1)

cssnano@3.4.0 node_modules/cssnano
├── object-assign@4.0.1
├── postcss-normalize-charset@1.1.0
├── postcss-reduce-transforms@1.0.3
├── postcss-minify-gradients@1.0.1
├── postcss-ordered-values@2.0.2
├── indexes-of@1.0.1
├── postcss-discard-empty@2.0.0
├── postcss-discard-duplicates@2.0.0
├── postcss-reduce-idents@2.2.1
├── postcss-convert-values@2.3.4
├── postcss-merge-rules@2.0.3
├── defined@1.0.0
├── postcss-value-parser@3.2.3
├── decamelize@1.1.2 (escape-string-regexp@1.0.4)
├── postcss-filter-plugins@2.0.0 (uniqid@1.0.0)
├── postcss-zindex@2.0.1 (uniqs@2.0.0)
├── postcss-minify-params@1.0.4 (uniqs@2.0.0, alphanum-sort@1.0.2)
├── postcss-unique-selectors@2.0.1 (uniqs@2.0.0, alphanum-sort@1.0.2)
├── postcss-discard-unused@2.1.0 (flatten@0.0.1, uniqs@2.0.0)
├── postcss-minify-font-values@1.0.2 (uniqs@2.0.0)
├── postcss-merge-longhand@2.0.1
├── postcss-merge-idents@2.1.3 (has-own@1.0.0)
├── postcss-calc@5.0.0 (postcss-message-helpers@2.0.0, reduce-css-calc@1.2.0)
├── postcss-normalize-url@3.0.4 (is-absolute-url@2.0.0, normalize-url@1.4.0)
├── postcss-minify-selectors@2.0.1 (alphanum-sort@1.0.2, postcss-selector-parser@1.3.0)
├── postcss-colormin@2.1.8 (colormin@1.0.7)
├── postcss@5.0.14 (js-base64@2.1.9, supports-color@3.1.2, source-map@0.5.3)
├── postcss-svgo@2.1.1 (is-svg@1.1.1, svgo@0.6.1)
└── autoprefixer@6.2.3 (normalize-range@0.1.2, num2fraction@1.2.2, browserslist@1.0.1, caniuse-db@1.0.30000384)

caniuse-api@1.4.1 node_modules/caniuse-api
├── browserslist@1.0.1
├── lodash.memoize@2.4.1 (lodash.isfunction@2.4.1, lodash._keyprefix@2.4.2)
├── shelljs@0.5.3
├── lodash.uniq@3.2.2 (lodash._isiterateecall@3.0.9, lodash._getnative@3.9.1, lodash.isarray@3.0.4, lodash._baseuniq@3.0.3, lodash._basecallback@3.3.1)
└── caniuse-db@1.0.30000384

cssnext@1.8.4 node_modules/cssnext
├── postcss-custom-media@4.1.0
├── postcss-font-variant@1.2.0
├── postcss-messages@0.2.2
├── postcss-media-minmax@1.2.0
├── write-file-stdout@0.0.2
├── postcss-pseudoelements@2.2.0
├── exit@0.1.2
├── commander@2.9.0 (graceful-readlink@1.0.1)
├── read-file-stdin@0.2.0 (gather-stream@1.0.0)
├── pleeease-filters@1.0.1 (onecolor@2.4.2)
├── postcss-custom-selectors@2.3.0 (balanced-match@0.2.1)
├── postcss-selector-matches@1.2.1 (balanced-match@0.2.1)
├── postcss-selector-not@1.2.1 (balanced-match@0.2.1)
├── postcss-custom-properties@4.2.0 (balanced-match@0.1.0)
├── chalk@1.1.1 (escape-string-regexp@1.0.4, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)
├── postcss-color-rgba-fallback@1.3.1 (color-string@0.3.0)
├── to-space-case@0.1.3 (to-no-case@0.1.2)
├── postcss-calc@4.1.0 (postcss-message-helpers@2.0.0, reduce-css-calc@1.2.0)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── postcss-color-rebeccapurple@1.2.0 (color@0.9.0)
├── postcss-color-hwb@1.2.0 (postcss-message-helpers@2.0.0, reduce-function-call@1.0.1, color@0.10.1)
├── postcss-color-hex-alpha@1.3.0 (postcss-message-helpers@2.0.0, color@0.10.1)
├── to-slug-case@0.1.2 (to-space-case@0.1.2)
├── postcss-pseudo-class-any-link@0.2.1 (postcss-selector-parser@1.3.0)
├── postcss-color-gray@2.0.0 (postcss-message-helpers@2.0.0, reduce-function-call@1.0.1, color@0.7.3)
├── postcss@4.1.16 (js-base64@2.1.9, es6-promise@2.3.0, source-map@0.4.4)
├── postcss-reporter@0.1.0 (lodash.difference@3.2.2)
├── postcss-color-function@1.3.2 (postcss-message-helpers@1.1.1, balanced-match@0.1.0, css-color-function@1.2.1)
├── postcss-import@6.2.0 (object-assign@3.0.0, postcss-message-helpers@2.0.0, clone@0.1.19, es6-promise@2.3.0, glob@5.0.15, resolve@1.1.6)
├── chokidar@1.4.2 (path-is-absolute@1.0.0, inherits@2.0.1, glob-parent@2.0.0, async-each@0.1.6, is-glob@2.0.1, is-binary-path@1.0.1, readdirp@2.0.0, anymatch@1.3.0)
├── cssnano@2.6.1 (indexes-of@1.0.1, postcss-minify-font-weight@1.0.1, postcss-merge-idents@1.0.2, postcss-discard-empty@1.1.2, postcss-discard-duplicates@1.2.1, postcss-merge-rules@1.3.6, postcss-zindex@1.1.3, defined@1.0.0, balanced-match@0.2.1, postcss-merge-longhand@1.0.2, css-list@0.1.3, decamelize@1.1.2, postcss-filter-plugins@1.0.1, minimist@1.2.0, postcss-discard-unused@1.0.3, postcss-font-family@1.2.1, postcss-convert-values@1.3.1, postcss-ordered-values@1.1.1, postcss-unique-selectors@1.0.1, postcss-discard-comments@1.2.1, postcss-reduce-idents@1.0.3, postcss-normalize-url@2.1.3, postcss-minify-selectors@1.5.0, postcss-colormin@1.2.7, postcss-single-charset@0.3.0)
├── postcss-url@4.0.1 (path-is-absolute@1.0.0, mime@1.3.4, js-base64@2.1.9, reduce-function-call@1.0.1, directory-encoder@0.6.1)
├── pixrem@1.3.1 (reduce-css-calc@1.2.0, browserslist@0.5.0)
└── autoprefixer-core@5.2.1 (num2fraction@1.2.2, browserslist@0.4.0, caniuse-db@1.0.30000384)

@MoOx
Copy link
Collaborator

MoOx commented Jan 4, 2016

@KamilLelonek as you can see at the top of the install, caniuse-api hook "seems to" work

> node generator.js

caniuse-api: Generation ok

Can you take some times too look for the features.json or try to run the postinstall hook by hand to see what happen?

@KamilLelonek
Copy link

I figured out the reason. The problem happens when you have not enough RAM. When I added swap file, everything works fine.

This is worh mentioning in documentation, because it may lead to confusion.

@simplesthing
Copy link

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.

@alexdruhet
Copy link

Thanks @KamilLelonek, that was the same issue for me, now it works.

@sureshblp71
Copy link

sureshblp71 commented Jul 5, 2016

Hi Guys I am getting same issue. I have read above conversation but did't understand exactly what I need to do..Please help........

I am installing sharetribe Then i get this issue

Node version - v6.2.1
Ubuntu - 14.04

01:11:54 rails-client-assets.1 | Skipping routes export task. Routes file ./client/app/routes/routes.js exists already.
01:11:54 rails.1 | Waiting for app/assets/webpack/server-bundle.js...
01:11:54 rails.1 | app/assets/webpack/server-bundle.js found
01:11:54 rails-server-assets.1 | Skipping translation export task. Translation bundle ./client/app/i18n/all.js exists already.
01:11:54 rails-server-assets.1 | Waiting for client/app/routes/routes.js...
01:11:54 rails-server-assets.1 | client/app/routes/routes.js found
01:11:55 rails-client-assets.1 |
01:11:55 rails-client-assets.1 | > @ build:dev:client /home/vishal/myapps/sharetribe/client
01:11:55 rails-client-assets.1 | > webpack -w --config webpack.client.config.js
01:11:55 rails-client-assets.1 |
01:11:55 rails-server-assets.1 |
01:11:55 rails-server-assets.1 | > @ build:dev:server /home/vishal/myapps/sharetribe/client
01:11:55 rails-server-assets.1 | > webpack -w --config webpack.server.config.js
01:11:55 rails-server-assets.1 |
01:11:55 rails-client-assets.1 | module.js:442
01:11:55 rails-client-assets.1 | throw err;
01:11:55 rails-client-assets.1 | ^
01:11:55 rails-client-assets.1 |
01:11:55 rails-client-assets.1 | Error: Cannot find module '../features'
01:11:55 rails-client-assets.1 | at Function.Module._resolveFilename (module.js:440:15)
01:11:55 rails-client-assets.1 | at Function.Module._load (module.js:388:25)
01:11:55 rails-client-assets.1 | at Module.require (module.js:468:17)
01:11:55 rails-client-assets.1 | at require (internal/module.js:20:19)
01:11:55 rails-client-assets.1 | at Object. (/home/vishal/myapps/sharetribe/client/node_modules/caniuse-api/dist/index.js:19:32)
01:11:55 rails-client-assets.1 | at Module._compile (module.js:541:32)
01:11:55 rails-client-assets.1 | at Object.Module._extensions..js (module.js:550:10)
01:11:55 rails-client-assets.1 | at Module.load (module.js:458:32)
01:11:55 rails-client-assets.1 | at tryModuleLoad (module.js:417:12)
01:11:55 rails-client-assets.1 | at Function.Module._load (module.js:409:3)

@MoOx
Copy link
Collaborator

MoOx commented Jul 6, 2016

@sureshblp71 do you have .json in extensions? Webpack does not consume .json by default, you need to add json-loader and .json extension.

@geraldfullam
Copy link

I had this issue and a simple uninstall/reinstall of caniuse-* modules fixed the issue. Must have been postinstall generation failure the first time.

$ rm -rf node_modules/caniuse-*
$ npm i

…results in…

> caniuse-api@1.5.0 postinstall /…/node_modules/caniuse-api
> node generator.js
caniuse-api: Generation ok

@lrojas94
Copy link

Had the same issue as @sureshblp71 . The solution given by @geraldfullam worked just fine for me. Thank you.

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