arnthor3 / react-bootstrap-toggle

Bootstrap-toggle without the JQuery dependencies
Other
54 stars 16 forks source link

babel transform class properties plugin is not found #10

Closed 0181532686cf4a31163be0bf3e6bb6732bf closed 7 years ago

0181532686cf4a31163be0bf3e6bb6732bf commented 7 years ago
./~/react-bootstrap-toggle/dist/index.js
Module build failed: ReferenceError: Unknown plugin "transform-class-properties" specified in "/storage/work/frontend/node_modules/react-bootstrap-toggle/.babelrc" at 0, attempted to resolve relative to "/storage/work/frontend/node_modules/react-bootstrap-toggle"
    at /storage/work/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
    at Array.map (native)
    at Function.normalisePlugins (/storage/work/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/storage/work/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/storage/work/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/storage/work/frontend/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/storage/work/frontend/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/storage/work/frontend/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/storage/work/frontend/node_modules/babel-loader/lib/index.js:46:20)
    at Object.module.exports (/storage/work/frontend/node_modules/babel-loader/lib/index.js:163:20)
 @ ./app/components/App.js 13:13-46
 @ ./app/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 ./app/index.js
0181532686cf4a31163be0bf3e6bb6732bf commented 7 years ago

If I install it manually via npm, I get

./~/react-bootstrap-toggle/dist/index.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/storage/work/frontend/node_modules/react-bootstrap-toggle"
    at /storage/work/frontend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
arnthor3 commented 7 years ago

I am having a hard time reproducing this.

On your local version, could you check if perhaps the babel-preset-es2015 was omitted when you did your npm install, it should be visible in your_project/node_modules/babel-preset-es2015?

0181532686cf4a31163be0bf3e6bb6732bf commented 7 years ago

I've cleaned my node_modules dir and reinstalled all deps completely and the problem is gone. Thank you!