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

Unexpected token after eject with Component Folders with package.json #5865

Closed
derpoho opened this issue Nov 20, 2018 · 2 comments
Closed

Unexpected token after eject with Component Folders with package.json #5865

derpoho opened this issue Nov 20, 2018 · 2 comments
Labels

Comments

@derpoho
Copy link

derpoho commented Nov 20, 2018

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes
npm: 6.4.1
node: v9.10.1

Which terms did you search for in User Guide?

package.json, Unexpected token...

Environment

System:
OS: macOS 10.14.1
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Binaries:
Node: 9.10.1 - ~/.nvm/versions/node/v9.10.1/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v9.10.1/bin/npm
Browsers:
Chrome: 70.0.3538.102
Firefox: 61.0.2
Safari: 12.0.1
npmPackages:
react: ^16.6.3 => 16.6.3
react-dom: ^16.6.3 => 16.6.3
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found

Steps to Reproduce

(Write your steps here:)

  1. install cra
  2. create a component in a folder with an package.json in it which is referring the main component file
  3. import it in App.js
  4. keep building successfully
  5. eject cra
  6. build fails with unexpected token in the imported component

Expected Behavior

I expect it to build successfully

Actual Behavior

Build fails on first JSX from the imported component with an unexpected token error.

Reproducible Demo

Did a very basic demo of the bug.
App before ejecting is here: https://github.com/derpoho/cra-packaged-components-error/tree/master => builds
App after eject is here: https://github.com/derpoho/cra-packaged-components-error/tree/ejected => fails

Thanks guys, keep up the good work!

@stale
Copy link

stale bot commented Dec 20, 2018

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Dec 20, 2018
@stale
Copy link

stale bot commented Dec 26, 2018

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Dec 26, 2018
@lock lock bot locked and limited conversation to collaborators Jan 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant