appirio-tech/topcoder-app

build module error,jsx SyntaxError

Closed this issue · 0 comments

root@lambda-virtual-machine:~/topcoder/topcoder-app# npm run build

> topcoder-app@ build /home/lambda/topcoder/topcoder-app
> webpack --bail --progress --build --tc

 47% 321/520 build modules/home/lambda/topcoder/topcoder-app/app/directives/challenge-tile/challenge-tile.jade, line 26:
You should not have jade tags with multiple attributes.
 58% 442/548 build modulesModuleParseError: Module parse failed: /home/lambda/topcoder/topcoder-app/node_modules/._transform-loader@0.2.4@transform-loader/cacheable.js?envify!/home/lambda/topcoder/topcoder-app/node_modules/._appirio-tech-react-components@0.0.0@appirio-tech-react-components/components/Tooltip/Tooltip.jsx Unexpected token (163:6)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (163:6)
    at Parser.pp$4.raise (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:2221:15)
    at Parser.pp.unexpected (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:603:10)
    at Parser.pp$3.parseExprAtom (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1822:12)
    at Parser.pp$3.parseExprSubscripts (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1597:21)
    at Parser.pp$3.parseParenAndDistinguishExpression (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1861:32)
    at Parser.pp$3.parseExprAtom (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1796:19)
    at Parser.pp$3.parseExprSubscripts (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1597:21)
    at Parser.pp$1.parseVar (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1034:28)
    at Parser.pp$1.parseVarStatement (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:917:10)
    at Parser.pp$1.parseStatement (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:706:19)
    at Parser.pp$1.parseBlock (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:981:25)
    at Parser.pp$3.parseFunctionBody (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:2105:24)
    at Parser.pp$3.parseMethod (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:2075:10)
    at Parser.pp$1.parseClassMethod (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1137:25)
    at Parser.pp$1.parseClass (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:1118:14)
    at Parser.pp$1.parseStatement (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:697:19)
    at Parser.pp$1.parseTopLevel (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:638:25)
    at Parser.parse (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:516:17)
    at Object.parse (/home/lambda/topcoder/topcoder-app/node_modules/._acorn@3.3.0@acorn/dist/acorn.js:3098:39)
    at Parser.parse (/home/lambda/topcoder/topcoder-app/node_modules/._webpack@1.15.0@webpack/lib/Parser.js:902:15)
    at DependenciesBlock.<anonymous> (/home/lambda/topcoder/topcoder-app/node_modules/._webpack@1.15.0@webpack/lib/NormalModule.js:104:16)
    at DependenciesBlock.onModuleBuild (/home/lambda/topcoder/topcoder-app/node_modules/._webpack-core@0.6.9@webpack-core/lib/NormalModuleMixin.js:310:10)

    at DependenciesBlock.<anonymous> (/home/lambda/topcoder/topcoder-app/node_modules/._webpack@1.15.0@webpack/lib/NormalModule.js:113:20)
    at DependenciesBlock.onModuleBuild (/home/lambda/topcoder/topcoder-app/node_modules/._webpack-core@0.6.9@webpack-core/lib/NormalModuleMixin.js:310:10)
    at nextLoader (/home/lambda/topcoder/topcoder-app/node_modules/._webpack-core@0.6.9@webpack-core/lib/NormalModuleMixin.js:275:25)
    at /home/lambda/topcoder/topcoder-app/node_modules/._webpack-core@0.6.9@webpack-core/lib/NormalModuleMixin.js:292:15
    at context.callback (/home/lambda/topcoder/topcoder-app/node_modules/._webpack-core@0.6.9@webpack-core/lib/NormalModuleMixin.js:148:14)
    at Stream.<anonymous> (/home/lambda/topcoder/topcoder-app/node_modules/._transform-loader@0.2.4@transform-loader/index.js:43:4)
    at emitNone (events.js:85:20)
    at Stream.emit (events.js:179:7)
    at drain (/home/lambda/topcoder/topcoder-app/node_modules/._through@2.3.8@through/index.js:34:23)
    at Stream.stream.queue.stream.push (/home/lambda/topcoder/topcoder-app/node_modules/._through@2.3.8@through/index.js:45:5)
    at Stream.flush (/home/lambda/topcoder/topcoder-app/node_modules/._envify@3.4.1@envify/custom.js:35:12)
    at _end (/home/lambda/topcoder/topcoder-app/node_modules/._through@2.3.8@through/index.js:65:9)
    at Stream.stream.end (/home/lambda/topcoder/topcoder-app/node_modules/._through@2.3.8@through/index.js:74:5)
    at next (/home/lambda/topcoder/topcoder-app/node_modules/._transform-loader@0.2.4@transform-loader/index.js:51:10)
    at /home/lambda/topcoder/topcoder-app/node_modules/._transform-loader@0.2.4@transform-loader/index.js:23:4
    at /home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/UnsafeCachePlugin.js:29:4
    at onResolved (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/Resolver.js:39:10)
    at innerCallback (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/Resolver.js:89:22)
    at loggingCallbackWrapper (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/createInnerCallback.js:21:19)
    at /home/lambda/topcoder/topcoder-app/node_modules/._tapable@0.1.10@tapable/lib/Tapable.js:134:6
    at Tapable.<anonymous> (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/DirectoryDescriptionFileFieldAliasPlugin.js:75:26)
    at /home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/DirectoryDescriptionFileFieldAliasPlugin.js:52:26
    at Storage.provide (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at findDescriptionFile (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/DirectoryDescriptionFileFieldAliasPlugin.js:16:23)
    at /home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/DirectoryDescriptionFileFieldAliasPlugin.js:22:13
    at Storage.provide (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/CachedInputFileSystem.js:52:20)
    at CachedInputFileSystem.readFile (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/CachedInputFileSystem.js:140:24)
    at findDescriptionFile (/home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/DirectoryDescriptionFileFieldAliasPlugin.js:16:23)
    at /home/lambda/topcoder/topcoder-app/node_modules/._enhanced-resolve@0.9.1@enhanced-resolve/lib/DirectoryDescriptionFileFieldAliasPlugin.js:22:13

 66% 1471/1567 build modulesWARNING: [Bourbon] [Deprecation] `display` is deprecated and will be removed in 5.0.0. We suggest using an automated prefixing tool, like Autoprefixer.
Backtrace:
    node_modules/._bourbon@4.3.4@bourbon/app/assets/stylesheets/_bourbon-deprecate.scss:10, in mixin `-bourbon-deprecate`
    node_modules/._bourbon@4.3.4@bourbon/app/assets/stylesheets/_bourbon-deprecate.scss:17, in mixin `-bourbon-deprecate-for-prefixing`
    node_modules/._bourbon@4.3.4@bourbon/app/assets/stylesheets/css3/_flex-box.scss:87, in mixin `display`
    node_modules/appirio-styles/styles/topcoder/_tc-styles.scss:26

////////////////////////////////// some of the node modules version

├── appirio-tech-ng-auth@4.2.6 -> /home/lambda/topcoder/topcoder-app/node_modules/._appirio-tech-ng-auth@4.2.6@appirio-tech-ng-auth extraneous
├── appirio-tech-ng-iso-constants@1.0.6 -> /home/lambda/topcoder/topcoder-app/node_modules/._appirio-tech-ng-iso-constants@1.0.6@appirio-tech-ng-iso-constants
├── appirio-tech-ng-ui-components@2.2.4 -> /home/lambda/topcoder/topcoder-app/node_modules/._appirio-tech-ng-ui-components@2.2.4@appirio-tech-ng-ui-components
├── appirio-tech-ng-work-constants@0.0.1 -> /home/lambda/topcoder/topcoder-app/node_modules/._appirio-tech-ng-work-constants@0.0.1@appirio-tech-ng-work-constants extraneous
├── appirio-tech-react-components@0.0.0 -> /home/lambda/topcoder/topcoder-app/node_modules/._appirio-tech-react-components@0.0.0@appirio-tech-react-components invalid (https://github.com/appirio-tech/react-components.git#tom-styling-fixes)
├── appirio-tech-webpack-config@0.3.18 -> /home/lambda/topcoder/topcoder-app/node_modules/._appirio-tech-webpack-config@0.3.18@appirio-tech-webpack-config
...
├── babel-core@6.24.1 -> /home/lambda/topcoder/topcoder-app/node_modules/._babel-core@6.24.1@babel-core extraneous
├── babel-loader@6.4.1 -> /home/lambda/topcoder/topcoder-app/node_modules/._babel-loader@6.4.1@babel-loader extraneous
├── babel-plugin-syntax-jsx@6.18.0 -> /home/lambda/topcoder/topcoder-app/node_modules/._babel-plugin-syntax-jsx@6.18.0@babel-plugin-syntax-jsx extraneous
├── babel-preset-react@6.24.1 -> /home/lambda/topcoder/topcoder-app/node_modules/._babel-preset-react@6.24.1@babel-preset-react extraneous
├── babel-plugin-transform-react-jsx@6.24.1 -> /home/lambda/topcoder/topcoder-app/node_modules/._babel-plugin-transform-react-jsx@6.24.1@babel-plugin-transform-react-jsx extraneous
├── babel-plugin-transform-react-jsx-self@6.22.0 -> /home/lambda/topcoder/topcoder-app/node_modules/._babel-plugin-transform-react-jsx-self@6.22.0@babel-plugin-transform-react-jsx-self extraneous
├── babel-plugin-transform-react-jsx-source@6.22.0 -> /home/lambda/topcoder/topcoder-app/node_modules/._babel-plugin-transform-react-jsx-source@6.22.0@babel-plugin-transform-react-jsx-source extraneous

//////////////////////////////node_modules/appirio-tech-webpack-config/webpack.config.coffee

...
config.module =
    preLoaders: []
    loaders: [
      test: /\.(js|jsx)$/
      loader: 'babel'
      exclude: /node_modules\/(?!appirio|topcoder|tc|input\-moment)/
      include: path.join dirname, '..'
      query:
        presets: [ 'es2015', 'react', 'stage-2' ]
        plugins: [ 'lodash' ]
   ...

//////////////////////////////node_modules/appirio-tech-react-components/.babelrc

{
  "presets": ["es2015", "react", "stage-2"]
}

//////////////////////////my environment
node v5.12.0
npm v3.8.6
System: Ubuntu 16.04.2 LTS

I also noticed that the apirio-tech-react-components package shows invalid status,but I can't fix it.
I tried "npm install appirio-tech-react-components","npm install github:appirio-tech/react-components.git#tom-styling-fixes " or single build this module(build succefully),but doesn't help.
////////////////////////////////////////////////////////

>npm list appirio-tech-react-components


├── appirio-tech-react-components@0.0.0  -> /home/lambda/topcoder/topcoder-app/node_modules/._appirio-tech-react-components@0.0.0@appirio-tech-react-components invalid (https://github.com/appirio-tech/react-components.git#tom-styling-fixes)
├── UNMET PEER DEPENDENCY react@15.5.4 -> /home/lambda/topcoder/topcoder-app/node_modules/._react@15.5.4@react extraneous
└── UNMET PEER DEPENDENCY react-dom@15.5.4 -> /home/lambda/topcoder/topcoder-app/node_modules/._react-dom@15.5.4@react-dom extraneous

npm ERR! peer dep missing: react@0, required by jade-react-loader@1.0.2
npm ERR! peer dep missing: react@^0.14.8, required by react-addons-css-transition-group@0.14.8
npm ERR! peer dep missing: react@>=0.12.0 <0.15.0, required by react-jade@2.5.0
npm ERR! peer dep missing: react@^0.14.0, required by react-select@1.0.0-beta8
npm ERR! peer dep missing: react-dom@^0.14.0, required by react-select@1.0.0-beta8
npm ERR! invalid: appirio-tech-react-components@0.0.0 /home/lambda/topcoder/topcoder-app/node_modules/appirio-tech-react-components