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

Unknown plugin "babel-plugin-transform-object-rest-spread" #7207

Closed
rnmalone opened this Issue Jan 12, 2018 · 7 comments

Comments

Projects
None yet
6 participants
@rnmalone

rnmalone commented Jan 12, 2018

Good morning,

I am trying to build my project, but have run into an issue at the last hurdle.

ERROR in ./client/main.js
Module build failed: ReferenceError: Unknown plugin "babel-plugin-transform-object-rest-spread" specified in "/opt/portal/.babelrc" at 0, attempted to resolve relative to "/opt/portal"

I had to add this plugin for a helper function and it's caused more issues than its solved, though likely my incompetence is at fault.

.babelrc
{ "plugins": ["transform-object-rest-spread"] }

package.json
"devDependencies": { "babel-plugin-transform-object-rest-spread": "^6.26.0", ... }

webpack.config.js
config.module.rules.push( { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: project.build.babel } } );

I am also mythed as I can't seem to find any other babel config files to explicitly add this plugin?

Any assistance would be appreciated greatly :^)

@babel-bot

This comment has been minimized.

Show comment
Hide comment
@babel-bot

babel-bot Jan 12, 2018

Collaborator

Hey @rnmalone! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

Collaborator

babel-bot commented Jan 12, 2018

Hey @rnmalone! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@xtuc

This comment has been minimized.

Show comment
Hide comment
@xtuc

xtuc Jan 12, 2018

Member

Your configuration looks correct, just to be sure did you run npm install?

Member

xtuc commented Jan 12, 2018

Your configuration looks correct, just to be sure did you run npm install?

@ccabo1

This comment has been minimized.

Show comment
Hide comment
@ccabo1

ccabo1 Jan 13, 2018

Running into the same issue--works fine in development though not when deployed to heroku:

2018-01-13T18:38:47.280671+00:00 app[web.1]: ERROR in ./frontend/index.js
2018-01-13T18:38:47.280673+00:00 app[web.1]: Module build failed: ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "/app/.babelrc" at 1, attempted to resolve relative to "/app"
2018-01-13T18:38:47.280674+00:00 app[web.1]:     at /app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
2018-01-13T18:38:47.280675+00:00 app[web.1]:     at Array.map (<anonymous>)
2018-01-13T18:38:47.280677+00:00 app[web.1]:     at Function.normalisePlugins (/app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
2018-01-13T18:38:47.280678+00:00 app[web.1]:     at OptionManager.mergeOptions (/app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
2018-01-13T18:38:47.280679+00:00 app[web.1]:     at OptionManager.init (/app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
2018-01-13T18:38:47.280680+00:00 app[web.1]:     at File.initOptions (/app/node_modules/babel-core/lib/transformation/file/index.js:212:65)
2018-01-13T18:38:47.280681+00:00 app[web.1]:     at new File (/app/node_modules/babel-core/lib/transformation/file/index.js:135:24)
2018-01-13T18:38:47.280682+00:00 app[web.1]:     at Pipeline.transform (/app/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
2018-01-13T18:38:47.280683+00:00 app[web.1]:     at transpile (/app/node_modules/babel-loader/lib/index.js:46:20)
2018-01-13T18:38:47.280685+00:00 app[web.1]:     at Object.module.exports (/app/node_modules/babel-loader/lib/index.js:163:20)

ccabo1 commented Jan 13, 2018

Running into the same issue--works fine in development though not when deployed to heroku:

2018-01-13T18:38:47.280671+00:00 app[web.1]: ERROR in ./frontend/index.js
2018-01-13T18:38:47.280673+00:00 app[web.1]: Module build failed: ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "/app/.babelrc" at 1, attempted to resolve relative to "/app"
2018-01-13T18:38:47.280674+00:00 app[web.1]:     at /app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
2018-01-13T18:38:47.280675+00:00 app[web.1]:     at Array.map (<anonymous>)
2018-01-13T18:38:47.280677+00:00 app[web.1]:     at Function.normalisePlugins (/app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
2018-01-13T18:38:47.280678+00:00 app[web.1]:     at OptionManager.mergeOptions (/app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
2018-01-13T18:38:47.280679+00:00 app[web.1]:     at OptionManager.init (/app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
2018-01-13T18:38:47.280680+00:00 app[web.1]:     at File.initOptions (/app/node_modules/babel-core/lib/transformation/file/index.js:212:65)
2018-01-13T18:38:47.280681+00:00 app[web.1]:     at new File (/app/node_modules/babel-core/lib/transformation/file/index.js:135:24)
2018-01-13T18:38:47.280682+00:00 app[web.1]:     at Pipeline.transform (/app/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
2018-01-13T18:38:47.280683+00:00 app[web.1]:     at transpile (/app/node_modules/babel-loader/lib/index.js:46:20)
2018-01-13T18:38:47.280685+00:00 app[web.1]:     at Object.module.exports (/app/node_modules/babel-loader/lib/index.js:163:20)
@xtuc

This comment has been minimized.

Show comment
Hide comment
@xtuc

xtuc Jan 13, 2018

Member

@ccabo1 could you please share your package.json?

Member

xtuc commented Jan 13, 2018

@ccabo1 could you please share your package.json?

@barkncats

This comment has been minimized.

Show comment
Hide comment
@barkncats

barkncats Jan 13, 2018

I am rather new to this, am following a video course.

Everything was working fine, then 2 days ago when I attempted to start project with webpack (compile/dev server) I received a similar message:

Unknown plugin "babel-plugin-transform-object-rest-spread"

I have been using yarn to add packages to the project. I tried a remove/add, no error messages, but also no success eliminating error message. When I look at the directory in node-modules, the is no /lib directory in the one for "babel-plugin-transform-object-rest-spread" or "babel-plugin-syntax-object-rest-spread".

npm install in another project seemed to work properly, at least there was a /lib directory with an index.js file in it.

Don't know whether issue with yarn or babel addon.

Apologies for any issues my inexperience may create.

barkncats commented Jan 13, 2018

I am rather new to this, am following a video course.

Everything was working fine, then 2 days ago when I attempted to start project with webpack (compile/dev server) I received a similar message:

Unknown plugin "babel-plugin-transform-object-rest-spread"

I have been using yarn to add packages to the project. I tried a remove/add, no error messages, but also no success eliminating error message. When I look at the directory in node-modules, the is no /lib directory in the one for "babel-plugin-transform-object-rest-spread" or "babel-plugin-syntax-object-rest-spread".

npm install in another project seemed to work properly, at least there was a /lib directory with an index.js file in it.

Don't know whether issue with yarn or babel addon.

Apologies for any issues my inexperience may create.

@barkncats

This comment has been minimized.

Show comment
Hide comment
@barkncats

barkncats Jan 13, 2018

My apologies, inexperience definitely involved.

Clearing the yarn cache, deleting /node_modules and running "yarn install" seems to have resolved my problem.

Not sure what caused the problem since everything was working fine the day before when I stopped webpack. Tried deleting directories and running "yarn install" multiple times. Only found out about yarn cache during web search last hour. Also, should have indicated Win10 is my OS.

Again, my apologies for commenting here.

barkncats commented Jan 13, 2018

My apologies, inexperience definitely involved.

Clearing the yarn cache, deleting /node_modules and running "yarn install" seems to have resolved my problem.

Not sure what caused the problem since everything was working fine the day before when I stopped webpack. Tried deleting directories and running "yarn install" multiple times. Only found out about yarn cache during web search last hour. Also, should have indicated Win10 is my OS.

Again, my apologies for commenting here.

@xtuc

This comment has been minimized.

Show comment
Hide comment
@xtuc

xtuc Jan 13, 2018

Member

Ok no worries @barkncats

Member

xtuc commented Jan 13, 2018

Ok no worries @barkncats

@hzoo hzoo closed this Jan 18, 2018

@lock lock bot added the outdated label May 3, 2018

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.