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

Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) #1083

Closed
hotamateurxxx opened this issue Jan 7, 2022 · 4 comments

Comments

@hotamateurxxx
Copy link

hotamateurxxx commented Jan 7, 2022

Expected Behavior

Successfull build.

Actual Behavior

yarn build

...

Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
    at error (D:\Projects\github.com\rollup-typescript-bug\node_modules\rollup\dist\shared\rollup.js:158:30)
    at Module.error (D:\Projects\github.com\rollup-typescript-bug\node_modules\rollup\dist\shared\rollup.js:12423:16)
    at Module.tryParse (D:\Projects\github.com\rollup-typescript-bug\node_modules\rollup\dist\shared\rollup.js:12826:25)
    at Module.setSource (D:\Projects\github.com\rollup-typescript-bug\node_modules\rollup\dist\shared\rollup.js:12729:24)
    at ModuleLoader.addModuleSource (D:\Projects\github.com\rollup-typescript-bug\node_modules\rollup\dist\shared\rollup.js:22202:20)

Additional Information

Got closed issue Typescript plugin 4.0.0 Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) #287 with plugin version that should to contain fix:

node_modules\@rollup\plugin-typescript\CHANGELOG.md

v8.2.1

2021-03-26

Bugfixes

@shellscape
Copy link
Collaborator

Please update your issue with the full template information.

@hotamateurxxx
Copy link
Author

Update reproduction repo. Bug cause in case when you need to push build scripts into subfolder.

@shellscape, is that issue corresponds to full template information now?

@xenobytezero
Copy link

Rollup Plugin Name: @rollup/plugin-typescript
Rollup Plugin Version: ^8.3.1
Rollup Version: ^2.68.0
TypeScript Version: ^4.5.5
Node Version: v16.13.2
Operating System (or Browser): Windows 10

I can confirm that I am also getting this issue for the same reasons as the closed issue #287 , where the filter is not picking up the file in the load() hook.

@stale
Copy link

stale bot commented Apr 29, 2022

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

@stale stale bot closed this as completed Apr 29, 2022
personalizedrefrigerator added a commit to personalizedrefrigerator/joplin that referenced this issue Jul 30, 2022
Rollup was having trouble importing TypeScript from other packages
in the repo. See rollup/plugins#1083 and
rollup/plugins#287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants