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

acorn-lose error with tern 0.23.3 or up #1044

Open
oeddyo opened this issue Feb 14, 2021 · 2 comments
Open

acorn-lose error with tern 0.23.3 or up #1044

oeddyo opened this issue Feb 14, 2021 · 2 comments

Comments

@oeddyo
Copy link

oeddyo commented Feb 14, 2021

Hi @marijnh

First of all thanks for this amazing software (and many other things like CM)!

I just found that if you use tern with version 0.23.3 and up in react project, it will report an error as below. If I downgrade tern to 0.22 then it's all fine. Could you take a look and see if it's a bug please?

Thanks


Uncaught TypeError: Cannot set property 'tabSize' of undefined
    at Module../node_modules/acorn-loose/dist/acorn-loose.mjs (acorn-loose.mjs:1359)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at infer.js:17
    at Object../node_modules/tern/lib/infer.js (infer.js:22)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at tern.js:9
    at Object../node_modules/tern/lib/tern.js (tern.js:14)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Module.<anonymous> (store.tsx:18)
    at Module../src/widget/components/code-editor/index.tsx (index.tsx:74)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Module.<anonymous> (index.tsx:18)
    at Module../src/pages/play-ground.tsx (play-ground.tsx:22)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Module.<anonymous> (index.css:9)
    at Module../src/app.tsx (app.tsx:21)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Module.<anonymous> (index.css?bb0a:82)
    at Module../src/index.tsx (index.tsx:18)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object.1 (index.tsx:74)
    at __webpack_require__ (bootstrap:856)
    at checkDeferredModules (bootstrap:45)
    at Array.webpackJsonpCallback [as push] (bootstrap:32)
    at main.chunk.js:1

@oeddyo
Copy link
Author

oeddyo commented Feb 14, 2021

Failed to compile.

./node_modules/acorn-loose/dist/acorn-loose.mjs
Can't import the named export 'Node' from non EcmaScript module (only default export is available)

@Ajaya1000
Copy link

The same happened to me.

ERROR in ./node_modules/acorn-loose/dist/acorn-loose.mjs 1281:30-38
Can't import the named export 'tokTypes' from non EcmaScript module (only default export is available)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants