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.

> [email protected] 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.
[email protected] /Users/kof/work/projects/kof/cssinjs/styled-jss/examples/prejss
├── [email protected] extraneous
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│   ├─┬ [email protected]
│   │ ├── [email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├── [email protected]
│   │ │ ├── [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ └── [email protected]
│   │ │ ├── [email protected]
│   │ │ └── [email protected]
│   │ ├── [email protected]
│   │ ├── [email protected]
│   │ └─┬ [email protected]
│   │   └── [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ ├── [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ ├─┬ [email protected]
│   │ │ │ │ └── [email protected]
│   │ │ │ └── [email protected]
│   │ │ ├── [email protected]
│   │ │ ├── [email protected]
│   │ │ ├─┬ [email protected]
│   │ │ │ └─┬ [email protected]
│   │ │ │   └── [email protected]
│   │ │ └── [email protected]
│   │ ├── [email protected]
│   │ ├── [email protected]
│   │ └── [email protected]
│   ├── [email protected]
│   ├── [email protected]
│   └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │   ├─┬ [email protected]
│ │   │ └── [email protected]
│ │   ├─┬ [email protected]
│ │   │ └── [email protected]
│ │   ├── [email protected]
│ │   └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   ├── [email protected]
│ │   ├── [email protected]
│ │   └─┬ [email protected]
│ │     └── [email protected]
│ └─┬ [email protected]
│   └─┬ [email protected]
│     └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│   └─┬ [email protected]
│     └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected]
│   └─┬ [email protected]
│     ├── [email protected]
│     ├─┬ [email protected]
│     │ └── [email protected]
│     ├─┬ [email protected]
│     │ ├─┬ [email protected]
│     │ │ └── [email protected]
│     │ └── [email protected]
│     └─┬ [email protected]
│       ├── [email protected]
│       ├─┬ [email protected]
│       │ ├── [email protected]
│       │ └── [email protected]
│       ├─┬ [email protected]
│       │ └── [email protected]
│       ├─┬ [email protected]
│       │ ├─┬ [email protected]
│       │ │ └── [email protected]
│       │ └── [email protected]
│       └─┬ [email protected]
│         └── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY react@>=14
└─┬ [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  └── 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