ridhwaans / homehost

self-hosted, Netflix-like app made for streaming
MIT License
1.07k stars 119 forks source link

Babel error on starting homehost by running yarn homehost #10

Closed arihantjn53 closed 5 years ago

arihantjn53 commented 5 years ago
[1] ERROR in ./src/index.js
[1] Module build failed (from ./node_modules/babel-loader/lib/index.js):
[1] Error: [BABEL] /home/arihant/Downloads/homehost-master/client/src/index.js: 
[1] As of v7.0.0-beta.55, we've removed Babel's Stage presets.
[1] Please consider reading our blog post on this decision at
[1] https://babeljs.io/blog/2018/07/27/removing-babels-stage-presets
[1] for more details. TL;DR is that it's more beneficial in the
[1]   long run to explicitly add which proposals to use.
[1] 
[1] For a more automatic migration, we have updated babel-upgrade,
[1] https://github.com/babel/babel-upgrade to do this for you with
[1] "npx babel-upgrade".
[1] 
[1] If you want the same configuration as before:
[1] 
[1] {
[1]   "plugins": [
[1]     // Stage 2
[1]     ["@babel/plugin-proposal-decorators", { "legacy": true }],
[1]     "@babel/plugin-proposal-function-sent",
[1]     "@babel/plugin-proposal-export-namespace-from",
[1]     "@babel/plugin-proposal-numeric-separator",
[1]     "@babel/plugin-proposal-throw-expressions",
[1] 
[1]     // Stage 3
[1]     "@babel/plugin-syntax-dynamic-import",
[1]     "@babel/plugin-syntax-import-meta",
[1]     ["@babel/plugin-proposal-class-properties", { "loose": false }],
[1]     "@babel/plugin-proposal-json-strings"
[1]   ]
[1] }
[1] 
[1] If you're using the same configuration across many separate projects,
[1] keep in mind that you can also create your own custom presets with
[1] whichever plugins and presets you're looking to use.
[1] 
[1] module.exports = function() {
[1]   return {
[1]     plugins: [
[1]       require("@babel/plugin-syntax-dynamic-import"),
[1]       [require("@babel/plugin-proposal-decorators"), { "legacy": true }],
[1]       [require("@babel/plugin-proposal-class-properties"), { "loose": false }],
[1]     ],
[1]     presets: [
[1]       // ...
[1]     ],
[1]   };
[1] };
[1]  (While processing: "/home/arihant/Downloads/homehost-master/client/node_modules/@babel/preset-stage-2/lib/index.js")
[1]     at _default (/home/arihant/Downloads/homehost-master/client/node_modules/@babel/preset-stage-2/lib/index.js:9:9)
[1]     at loadDescriptor (/home/arihant/Downloads/homehost-master/client/node_modules/@babel/core/lib/config/full.js:165:14)
[1]     at cachedFunction (/home/arihant/Downloads/homehost-master/client/node_modules/@babel/core/lib/config/caching.js:33:19)
[1]     at loadPresetDescriptor (/home/arihant/Downloads/homehost-master/client/node_modules/@babel/core/lib/config/full.js:235:63)
[1]     at config.presets.reduce (/home/arihant/Downloads/homehost-master/client/node_modules/@babel/core/lib/config/full.js:77:21)
[1]     at Array.reduce (<anonymous>)
[1]     at recurseDescriptors (/home/arihant/Downloads/homehost-master/client/node_modules/@babel/core/lib/config/full.js:74:38)
[1]     at loadFullConfig (/home/arihant/Downloads/homehost-master/client/node_modules/@babel/core/lib/config/full.js:108:6)
[1]     at process.nextTick (/home/arihant/Downloads/homehost-master/client/node_modules/@babel/core/lib/transform.js:28:33)
[1]     at processTicksAndRejections (internal/process/next_tick.js:74:9)
[1]  @ multi (webpack)-dev-server/client?http://localhost:3000 (webpack)/hot/dev-server.js babel-polyfill ./src/index.js app[3]
[1] ℹ 「wdm」: Failed to compile.
ridhwaans commented 5 years ago

I assume you are using the latest master.

arihantjn53 commented 5 years ago

Yes, I am using the latest master and ran npm install on client/ folder as well.

devDependencies from client/package.json:

 "devDependencies": {
    "@babel/core": "^7.3.4",
    "@babel/preset-env": "^7.3.4",
    "@babel/preset-react": "^7.0.0-beta.51",
    "@babel/preset-stage-2": "^7.0.0",
    "babel-loader": "^8.0.0-beta.2",
    "babel-polyfill": "^6.26.0",
    "babel-preset-stage-2": "^6.24.1",
    "css-loader": "^0.28.11",
    "file-loader": "^1.1.11",
    "npm-check-updates": "^3.0.8",
    "style-loader": "^0.21.0",
    "webpack": "^4.29.6",
    "webpack-cli": "^3.0.8",
    "webpack-dev-server": "^3.2.1"
  }
}
ridhwaans commented 5 years ago

@arihantjn53 can you pull master and try again

arihantjn53 commented 5 years ago

Thanks @ridhwaans.