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

TypeError: chunks.map is not a function #19

Open
kof opened this issue May 14, 2017 · 2 comments
Open

TypeError: chunks.map is not a function #19

kof opened this issue May 14, 2017 · 2 comments
Assignees
Labels

Comments

@kof
Copy link

kof commented May 14, 2017

Just tried to create an example for styled-jss and got this error:

  prejss git:(prejss) npm run build                      
(node:96238) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:96238) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:96238) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:96238) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

> styled-jss-with-prejss-example@0.1.0 build /Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss
> babel src --out-dir lib

TypeError: chunks.map is not a function
    at exports.default (/Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/prejss/lib/extract-expressions.js:25:24)
    at /Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/prejss/lib/create-adapter.js:33:36
    at Function.memoisePluginContainer (/Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/babel-core/lib/transformation/file/options/option-manager.js:113:13)
    at Function.normalisePlugin (/Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/babel-core/lib/transformation/file/options/option-manager.js:146:32)
    at /Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
    at Array.map (native)
    at Function.normalisePlugins (/Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss/node_modules/babel-core/lib/transformation/file/index.js:212:65)

Code for reproduction is here

node --version -> v6.10.2

Here is my result of npm show in case the issue is because of some dependency version:

➜  prejss git:(prejss) npm list
(node:97946) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:97946) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:97946) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:97946) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:97946) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:97946) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:97946) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:97946) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
styled-jss-with-prejss-example@0.1.0 /Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss
├── babel-cli@6.24.1 extraneous
├─┬ babel-plugin-transform-prejss@0.5.1
│ ├─┬ babel-types@6.24.1
│ │ ├─┬ babel-runtime@6.23.0
│ │ │ ├── core-js@2.4.1
│ │ │ └── regenerator-runtime@0.10.5
│ │ ├── esutils@2.0.2
│ │ ├── lodash@4.17.4
│ │ └── to-fast-properties@1.0.3
│ └─┬ prejss-postcss-parser@0.3.2
│   ├─┬ deasync@0.1.9
│   │ ├── bindings@1.2.1
│   │ └── nan@2.6.2
│   ├─┬ postcss@5.2.17
│   │ ├─┬ chalk@1.1.3
│   │ │ ├── ansi-styles@2.2.1
│   │ │ ├── escape-string-regexp@1.0.5
│   │ │ ├─┬ has-ansi@2.0.0
│   │ │ │ └── ansi-regex@2.1.1
│   │ │ ├── strip-ansi@3.0.1
│   │ │ └── supports-color@2.0.0
│   │ ├── js-base64@2.1.9
│   │ ├── source-map@0.5.6
│   │ └─┬ supports-color@3.2.3
│   │   └── has-flag@1.0.0
│   ├─┬ postcss-js@0.3.0
│   │ └── camelcase-css@1.0.1
│   ├─┬ postcss-load-config@1.2.0
│   │ ├─┬ cosmiconfig@2.1.3
│   │ │ ├── is-directory@0.3.1
│   │ │ ├─┬ js-yaml@3.8.4
│   │ │ │ ├─┬ argparse@1.0.9
│   │ │ │ │ └── sprintf-js@1.0.3
│   │ │ │ └── esprima@3.1.3
│   │ │ ├── minimist@1.2.0
│   │ │ ├── os-homedir@1.0.2
│   │ │ ├─┬ parse-json@2.2.0
│   │ │ │ └─┬ error-ex@1.3.1
│   │ │ │   └── is-arrayish@0.2.1
│   │ │ └── require-from-string@1.2.1
│   │ ├── object-assign@4.1.1
│   │ ├── postcss-load-options@1.2.0
│   │ └── postcss-load-plugins@2.3.0
│   ├── postcss-safe-parser@2.0.1
│   ├── postcss-scss@0.4.1
│   └── postcss-simple-vars@3.1.0
├─┬ babel-preset-es2015@6.24.1
│ ├── babel-plugin-check-es2015-constants@6.22.0
│ ├── babel-plugin-transform-es2015-arrow-functions@6.22.0
│ ├── babel-plugin-transform-es2015-block-scoped-functions@6.22.0
│ ├─┬ babel-plugin-transform-es2015-block-scoping@6.24.1
│ │ ├─┬ babel-template@6.24.1
│ │ │ └── babylon@6.17.1
│ │ └─┬ babel-traverse@6.24.1
│ │   ├─┬ babel-code-frame@6.22.0
│ │   │ └── js-tokens@3.0.1
│ │   ├─┬ debug@2.6.6
│ │   │ └── ms@0.7.3
│ │   ├── globals@9.17.0
│ │   └── invariant@2.2.2
│ ├─┬ babel-plugin-transform-es2015-classes@6.24.1
│ │ ├── babel-helper-define-map@6.24.1
│ │ ├── babel-helper-function-name@6.24.1
│ │ ├── babel-helper-optimise-call-expression@6.24.1
│ │ ├── babel-helper-replace-supers@6.24.1
│ │ └── babel-messages@6.23.0
│ ├── babel-plugin-transform-es2015-computed-properties@6.24.1
│ ├── babel-plugin-transform-es2015-destructuring@6.23.0
│ ├── babel-plugin-transform-es2015-duplicate-keys@6.24.1
│ ├── babel-plugin-transform-es2015-for-of@6.23.0
│ ├── babel-plugin-transform-es2015-function-name@6.24.1
│ ├── babel-plugin-transform-es2015-literals@6.22.0
│ ├── babel-plugin-transform-es2015-modules-amd@6.24.1
│ ├─┬ babel-plugin-transform-es2015-modules-commonjs@6.24.1
│ │ └── babel-plugin-transform-strict-mode@6.24.1
│ ├─┬ babel-plugin-transform-es2015-modules-systemjs@6.24.1
│ │ └── babel-helper-hoist-variables@6.24.1
│ ├── babel-plugin-transform-es2015-modules-umd@6.24.1
│ ├── babel-plugin-transform-es2015-object-super@6.24.1
│ ├─┬ babel-plugin-transform-es2015-parameters@6.24.1
│ │ ├── babel-helper-call-delegate@6.24.1
│ │ └── babel-helper-get-function-arity@6.24.1
│ ├── babel-plugin-transform-es2015-shorthand-properties@6.24.1
│ ├── babel-plugin-transform-es2015-spread@6.22.0
│ ├─┬ babel-plugin-transform-es2015-sticky-regex@6.24.1
│ │ └── babel-helper-regex@6.24.1
│ ├── babel-plugin-transform-es2015-template-literals@6.22.0
│ ├── babel-plugin-transform-es2015-typeof-symbol@6.23.0
│ ├─┬ babel-plugin-transform-es2015-unicode-regex@6.24.1
│ │ └─┬ regexpu-core@2.0.0
│ │   ├── regenerate@1.3.2
│ │   ├── regjsgen@0.2.0
│ │   └─┬ regjsparser@0.1.5
│ │     └── jsesc@0.5.0
│ └─┬ babel-plugin-transform-regenerator@6.24.1
│   └─┬ regenerator-transform@0.9.11
│     └── private@0.1.7
├─┬ babel-preset-react@6.24.1
│ ├── babel-plugin-syntax-jsx@6.18.0
│ ├── babel-plugin-transform-react-display-name@6.23.0
│ ├─┬ babel-plugin-transform-react-jsx@6.24.1
│ │ └── babel-helper-builder-react-jsx@6.24.1
│ ├── babel-plugin-transform-react-jsx-self@6.22.0
│ ├── babel-plugin-transform-react-jsx-source@6.22.0
│ └─┬ babel-preset-flow@6.23.0
│   └─┬ babel-plugin-transform-flow-strip-types@6.22.0
│     └── babel-plugin-syntax-flow@6.18.0
├─┬ babel-preset-stage-0@6.24.1
│ ├─┬ babel-plugin-transform-do-expressions@6.22.0
│ │ └── babel-plugin-syntax-do-expressions@6.13.0
│ ├─┬ babel-plugin-transform-function-bind@6.22.0
│ │ └── babel-plugin-syntax-function-bind@6.13.0
│ └─┬ babel-preset-stage-1@6.24.1
│   ├─┬ babel-plugin-transform-class-constructor-call@6.24.1
│   │ └── babel-plugin-syntax-class-constructor-call@6.18.0
│   ├─┬ babel-plugin-transform-export-extensions@6.22.0
│   │ └── babel-plugin-syntax-export-extensions@6.13.0
│   └─┬ babel-preset-stage-2@6.24.1
│     ├── babel-plugin-syntax-dynamic-import@6.18.0
│     ├─┬ babel-plugin-transform-class-properties@6.24.1
│     │ └── babel-plugin-syntax-class-properties@6.13.0
│     ├─┬ babel-plugin-transform-decorators@6.24.1
│     │ ├─┬ babel-helper-explode-class@6.24.1
│     │ │ └── babel-helper-bindify-decorators@6.24.1
│     │ └── babel-plugin-syntax-decorators@6.13.0
│     └─┬ babel-preset-stage-3@6.24.1
│       ├── babel-plugin-syntax-trailing-function-commas@6.22.0
│       ├─┬ babel-plugin-transform-async-generator-functions@6.24.1
│       │ ├── babel-helper-remap-async-to-generator@6.24.1
│       │ └── babel-plugin-syntax-async-generators@6.13.0
│       ├─┬ babel-plugin-transform-async-to-generator@6.24.1
│       │ └── babel-plugin-syntax-async-functions@6.13.0
│       ├─┬ babel-plugin-transform-exponentiation-operator@6.24.1
│       │ ├─┬ babel-helper-builder-binary-assignment-operator-visitor@6.24.1
│       │ │ └── babel-helper-explode-assignable-expression@6.24.1
│       │ └── babel-plugin-syntax-exponentiation-operator@6.13.0
│       └─┬ babel-plugin-transform-object-rest-spread@6.23.0
│         └── babel-plugin-syntax-object-rest-spread@6.13.0
├── prejss@1.4.0
├── UNMET PEER DEPENDENCY react@>=14
└─┬ styled-jss@1.0.0
  ├── is-react-prop@0.1.2
  ├─┬ jss@7.1.2
  │ ├── is-in-browser@1.0.2
  │ └─┬ warning@3.0.0
  │   └── loose-envify@1.3.1
  ├─┬ jss-preset-default@2.0.0
  │ ├── jss-camel-case@4.0.0
  │ ├── jss-compose@3.0.1
  │ ├── jss-default-unit@6.1.1
  │ ├── jss-expand@3.0.1
  │ ├── jss-extend@4.0.1
  │ ├── jss-global@1.0.1
  │ ├── jss-nested@4.0.1
  │ ├── jss-props-sort@4.0.0
  │ └─┬ jss-vendor-prefixer@5.1.0
  │   └── css-vendor@0.3.8
  └── UNMET PEER DEPENDENCY react-dom@^15.0.0

cc @lttb

@kof
Copy link
Author

kof commented May 14, 2017

Steps:

  1. clone https://github.com/cssinjs/styled-jss/
  2. checkout prejss branch
  3. go to examples/prejss
  4. npm i
  5. npm run build

@mistadikay
Copy link

@kof in your .babelrc try renaming prejss to transform-prejss

@DenisIzmaylov DenisIzmaylov self-assigned this Aug 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants