Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Uncaught Error: ENOENT, node_modules/typescript/lib/lib.d.ts not found in /usr/share/atom/resourc... #22455

Open
ReedMerrill opened this issue May 19, 2021 · 27 comments

Comments

@ReedMerrill
Copy link

Reproduction Steps:

  1. Clicked "install" in the install menu of preferences to install. Package attempted to install was zotero-citations.

Atom: 1.57.0 x64
Electron: 9.4.4
OS: Ubuntu 20.04.2
Thrown From: Atom Core

Stack Trace

Uncaught Error: ENOENT, node_modules/typescript/lib/lib.d.ts not found in /usr/share/atom/resources/app.asar

At electron/js2c/asar.js:548

Error: ENOENT, node_modules/typescript/lib/lib.d.ts not found in /usr/share/atom/resources/app.asar
    at createError (electron/js2c/asar.js:111:17)
    at Object.fs.readFileSync (electron/js2c/asar.js:548:24)
    at TypeScriptSimple.createService (/app.asar/node_modules/typescript-simple/index.js:79:61)
    at TypeScriptSimple.compile (/app.asar/node_modules/typescript-simple/index.js:63:37)
    at Object.e.compile (/usr/share/atom/resources/app/static/<embedded>:11:582100)
    at Object.compile (/usr/share/atom/resources/app/static/<embedded>:11:577878)
    at compileFileAtPath (/usr/share/atom/resources/app/static/<embedded>:11:150953)
    at Object.value [as .ts] (/usr/share/atom/resources/app/static/<embedded>:11:153351)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at customRequire (/usr/share/atom/resources/app/static/<embedded>:1:756277)
    at requireModule (/usr/share/atom/resources/app/static/<embedded>:14:1191586)
    at Package.requireMainModule (/usr/share/atom/resources/app/static/<embedded>:11:3400508)
    at Package.activateConfig (/usr/share/atom/resources/app/static/<embedded>:11:3389796)
    at PackageManager.packageHasSettings (/usr/share/atom/resources/app/static/<embedded>:11:907975)
    at PackageCard.hasSettings (/usr/share/atom/resources/app/static/<embedded>:14:2722529)
    at PackageCard.updateSettingsState (/usr/share/atom/resources/app/static/<embedded>:14:2712797)
    at PackageCard.updateInterfaceState (/usr/share/atom/resources/app/static/<embedded>:14:2712620)
    at /usr/share/atom/resources/app/static/<embedded>:14:2720762
    at /usr/share/atom/resources/app/static/<embedded>:14:2722780
    at Function.simpleDispatch (/usr/share/atom/resources/app/static/<embedded>:11:1186190)
    at Emitter.emit (/usr/share/atom/resources/app/static/<embedded>:11:1187631)
    at PackageManager.emitPackageEvent (/usr/share/atom/resources/app/static/<embedded>:11:917432)
    at /usr/share/atom/resources/app/static/<embedded>:11:914564
    at r (/usr/share/atom/resources/app/static/<embedded>:11:909094)
    at n (/usr/share/atom/resources/app/static/<embedded>:14:1190909)
    at /usr/share/atom/resources/app/static/<embedded>:14:1191063

Commands

     -0:30.2.0 core:confirm (input.hidden-input)

Non-Core Packages

contrast-syntax 0.8.1 
count-word 0.2.3 
pandoc-convert 1.1.1 
vim-mode-plus 1.36.4 
zotero-citations 5.4.2 
@icecream17
Copy link
Contributor

Similar to #22432

@retorquere
Copy link

Is there a workaround for this?

@ReedMerrill
Copy link
Author

not that I've found. zotero-citations installed but throws an error the first time using the pick citation command in a session, and doesn't execute.

@icecream17
Copy link
Contributor

icecream17 commented May 20, 2021

Maybe go to /usr/share/atom/resources/app.asar and try npm install typescript, since the error is about the node_modules folder.

Note: Prerequisite: npm

@retorquere
Copy link

That's a workaround for me, but not for my users. How come tslib is loaded at all? I don't require it in my source, and all typescript related stuff is in dev dependencies.

@retorquere
Copy link

Adding typescript to the regular dependencies doesn't help.

@icecream17
Copy link
Contributor

icecream17 commented May 20, 2021

Idk. Maybe try atom --devor atom-beta --dev to get a better stacktrace

@retorquere
Copy link

That gives me

Uncaught Exception:
Error: Cannot find module '/Users/emile/github/atom/src/main-process/start'
Require stack:
- /Users/emile/Downloads/Atom.app/Contents/Resources/app.asar/src/main-process/main.js
- 
at Module._resolveFilename (internal/modules/cjs/loader.js:797:17)
at Function.o._resolveFilename (electron/js2c/browser_init.js:281:681)
at Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/emile/Downloads/Atom.app/Contents/Resources/app.asar/src/main-process/main.js:72:15)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Module.load (internal/modules/cjs/loader.js:815:32)

this bit seems strange to me:

Error: Cannot find module '/Users/emile/github/atom/src/main-process/start'

not only is that a path on my local disk, (/Users/emile/github/atom is my clone of the project), but /Users/emile/github/atom/src/main-process/start does indeed not exist, and I don't know what came up with that path. The term src does not occur in my project.

@icecream17
Copy link
Contributor

icecream17 commented Jun 1, 2021

That seems like a completely different error: the stacktrace says it comes from /Users/emile/Downloads/Atom.app/Contents/Resources/app.asar/src/main-process/main.js, so it's a problem with atom, not zotero-citations

EDIT: Wait, since https://github.com/atom/atom/blob/master/src/main-process/main.js exists... and you cloned atom but it doesn't exist, maybe that's what's causing the problem?

const start = require(path.join(resourcePath, 'src', 'main-process', 'start'));

atom/src/main-process/start.js does exist, so the variable resourcePath is wrong for some reason.

This is dev-mode, so probably

} else if (isAtomRepoPath(process.cwd())) {
devResourcePath = process.cwd();
is to blame.

Edit: It thinks you're testing the clone of atom instead of your actual atom - simply move to the actual atom directory.

@retorquere
Copy link

I don't follow? I didn't clone atom, I've just installed it, and I'm working in my package dir. When I apm link the module, it works, but when I apm publish that state of affairs, unlink, and install the published package, I'm back to

Uncaught Exception:
Error: Cannot find module '/Users/emile/github/atom/src/main-process/start'
Require stack:
- /Applications/Atom.app/Contents/Resources/app.asar/src/main-process/main.js
- 
at Module._resolveFilename (internal/modules/cjs/loader.js:797:17)
at Function.o._resolveFilename (electron/js2c/browser_init.js:281:681)
at Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/main-process/main.js:72:15)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Module.load (internal/modules/cjs/loader.js:815:32)

/Users/emile/github/atom/ is the path to the clone of my package, it is not the atom editor, maybe that's the confusion?

@icecream17
Copy link
Contributor

icecream17 commented Jun 2, 2021

Yes, it's doing the wrong atom, maybe cd into the correct atom directorycd is the command for windows

@retorquere
Copy link

What would be the correct atom directory? I don't need the source of atom cloned to develop an addon, right? I'm working in the clone of my addon (https://github.com/retorquere/zotero-citations/)

I'm on MacOS BTW.

I've renamed the directory of my addon clone to zotero-citations; the directory ~/github/atom no longer exists (even when this did use to work), when I publish, upgrade and restart, now I'm back to

Error: ENOENT, node_modules/typescript/lib/lib.d.ts not found in /Applications/Atom.app/Contents/Resources/app.asar
    at createError (electron/js2c/asar.js:111:17)
    at Object.fs.readFileSync (electron/js2c/asar.js:548:24)
    at TypeScriptSimple.createService (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/typescript-simple/index.js:79:61)
    at TypeScriptSimple.compile (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/typescript-simple/index.js:63:37)
    at Object.e.compile (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:582100)
    at Object.compile (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:577878)
    at compileFileAtPath (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:150953)
    at Object.value [as .ts] (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:153351)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:756278)
    at requireModule (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1191586)
    at Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3402829)
    at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3390813)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1879
    at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1186190)
    at Emitter.emit (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1187631)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:351847)
    at Object.didConfirmSelection (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:686807)
    at SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:555627)
    at SelectListView.didClickItem (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:553569)
    at ListItemView.onclick (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:552559)
    at ListItemView.didClick (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:556647)`

and same as before, when I apm link from my addon source location, it just works.

@icecream17
Copy link
Contributor

icecream17 commented Jun 2, 2021

Wow, this debugging is super weird.
I guess since you got the original error again, you can retry doing atom --dev for a better stacktrace.

Note: I think what's happening is that atom is requireing your package. Then it tries to compile it using typescript?
https://github.com/atom/atom/blob/master/src/module-utils.js is in the stacktrace, but I don't know where it goes next

@retorquere
Copy link

That would mean /Applications/Atom.app/Contents/MacOS/Atom --dev on MacOS?

@icecream17
Copy link
Contributor

Oh, I added C:\Users\Steven\AppData\Local\atom-beta\bin to my pathYours might be different. (Note: currently checking)

@retorquere
Copy link

Uncaught (in promise) Error: ERR_FILE_NOT_FOUND (-6) loading 'file:///Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/github/lib/renderer.html?js=%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar.unpacked%2Fnode_modules%2Fgithub%2Flib%2Fworker.js&managerWebContentsId=1&operationCountLimit=10&channelName=github%3Arenderer-ipc'
    at rejectAndCleanup (electron/js2c/browser_init.js:225:1288)
    at WebContents.failListener (electron/js2c/browser_init.js:225:1505)
    at WebContents.emit (events.js:223:5)

electron/js2c/asar.js:548 Uncaught Error: ENOENT, node_modules/typescript/lib/lib.d.ts not found in /Applications/Atom.app/Contents/Resources/app.asar
    at createError (electron/js2c/asar.js:111)
    at Object.fs.readFileSync (electron/js2c/asar.js:548)
    at TypeScriptSimple.createService (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/typescript-simple/index.js:79)
    at TypeScriptSimple.compile (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/typescript-simple/index.js:63)
    at Object.exports.compile (/Applications/Atom.app/Contents/Resources/app.asar/src/typescript.js:48)
    at Object.compile (/Applications/Atom.app/Contents/Resources/app.asar/src/package-transpilation-registry.js:66)
    at compileFileAtPath (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:109)
    at Object.value [as .ts] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:254)
    at Module.load (internal/modules/cjs/loader.js:815)
    at Module._load (internal/modules/cjs/loader.js:727)
    at Function.Module._load (electron/js2c/asar.js:769)
    at Module.require (internal/modules/cjs/loader.js:852)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:67)
    at requireModule (/Applications/Atom.app/Contents/Resources/app.asar/src/module-utils.js:3)
    at Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:909)
    at Package.activateConfig (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:292)
    at PackageManager.module.exports.PackageManager.packageHasSettings (package-manager.coffee:36)
    at PackageCard.hasSettings (package-card.js:647)
    at PackageCard.updateSettingsState (package-card.js:323)
    at PackageCard.updateInterfaceState (package-card.js:316)
    at package-card.js:586
    at package-card.js:658
    at Function.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/dist/emitter.js:64)
    at Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/dist/emitter.js:257)
    at PackageManager.module.exports.PackageManager.emitPackageEvent (package-manager.coffee:443)
    at package-manager.coffee:326
    at exit (package-manager.coffee:68)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:280)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:293
    at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:169)

@retorquere
Copy link

This is good?

@icecream17
Copy link
Contributor

icecream17 commented Jun 2, 2021

Yes

Edit: This was so trivial I shouldn't've needed the better stacktraces. Thanks though

@retorquere
Copy link

retorquere commented Jun 2, 2021

The above stack trace was in-app, this was written to the terminal where I started Atom --dev:

console log
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/pathwatcher/build/Release/pathwatcher.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/oniguruma/build/Release/onig_scanner.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/superstring/build/Release/superstring.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter/build/Release/tree_sitter_runtime_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/@atom/nsfw/build/Release/nsfw.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/git-utils/build/Release/git.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/scrollbar-style/build/Release/scrollbar-style-observer.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/pathwatcher/build/Release/pathwatcher.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/oniguruma/build/Release/onig_scanner.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/superstring/build/Release/superstring.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter/build/Release/tree_sitter_runtime_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/@atom/nsfw/build/Release/nsfw.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/git-utils/build/Release/git.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/scrollbar-style/build/Release/scrollbar-style-observer.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
2021-06-02 23:39:14.584 Atom[33733:2017938] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7fa01cb8d800>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-c/build/Release/tree_sitter_c_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-c/build/Release/tree_sitter_c_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-cpp/build/Release/tree_sitter_cpp_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-cpp/build/Release/tree_sitter_cpp_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-css/build/Release/tree_sitter_css_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-css/build/Release/tree_sitter_css_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-go/build/Release/tree_sitter_go_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-go/build/Release/tree_sitter_go_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-embedded-template/build/Release/tree_sitter_embedded_template_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-embedded-template/build/Release/tree_sitter_embedded_template_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-html/build/Release/tree_sitter_html_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-html/build/Release/tree_sitter_html_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/spellchecker/build/Release/spellchecker.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-java-dev/build/Release/tree_sitter_java_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-javascript/build/Release/tree_sitter_javascript_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-jsdoc/build/Release/tree_sitter_jsdoc_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-regex/build/Release/tree_sitter_regex_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-json/build/Release/tree_sitter_json_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/spellchecker/build/Release/spellchecker.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-java-dev/build/Release/tree_sitter_java_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-javascript/build/Release/tree_sitter_javascript_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-jsdoc/build/Release/tree_sitter_jsdoc_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-python/build/Release/tree_sitter_python_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-regex/build/Release/tree_sitter_regex_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-json/build/Release/tree_sitter_json_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-ruby/build/Release/tree_sitter_ruby_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/language-rust-bundled/node_modules/tree-sitter-rust/build/Release/tree_sitter_rust_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-bash/build/Release/tree_sitter_bash_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-python/build/Release/tree_sitter_python_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-typescript/build/Release/tree_sitter_tsx_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-ruby/build/Release/tree_sitter_ruby_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33739) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-typescript/build/Release/tree_sitter_typescript_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/language-rust-bundled/node_modules/tree-sitter-rust/build/Release/tree_sitter_rust_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-bash/build/Release/tree_sitter_bash_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-typescript/build/Release/tree_sitter_tsx_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:33740) Electron: Loading non-context-aware native module in renderer: '/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/tree-sitter-typescript/build/Release/tree_sitter_typescript_binding.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
2021-06-02 23:39:17.614 Atom[33733:2017938] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7fa022e58250>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2021-06-02 23:39:26.980 Atom[33733:2017938] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7fa022a46700>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.
2021-06-02 23:39:50.503 Atom[33733:2017938] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7fa019514160>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.

@icecream17
Copy link
Contributor

A "simple" fix would be to just do npm install typescript and submit that as a pr, but I can't get npm install or npm install typescript to work.


After doing sudo apt upgrade in the ubuntu subsystem for linux (on windows), I'm now updating my computer (it's stuck at 45%), so I have to wait for it to finish and reboot before doing choco upgrade all. And I just read the error message which says to try updating node-gyp. I should've read that earlier.

As I finished typing it went to 46%


Anyways, typescript-simple is used to transpile typescript files to javascript, but now there's the tsc cli by default when installing typescript
Also typescript-simple hasn't been updated in 2 years and is archived. So I'm thinking about removing typescript-simple and using something more updated.

Either way, typescript is needed as a dependency, and I'll make a pr as soon as I can get the command to work.

This also happens to be a start for implementing my idea at #22517 (comment).

@retorquere
Copy link

I've added typescript as a runtime (not dev) dependency to package.json but that does not seem to resolve the problem.

Is there a way to tell apm to only publish certain files (the compiled js files in this case) and not the typescript files?

@icecream17
Copy link
Contributor

The problem is that atom itself needs to install typescript as a dependency - there's not anything wrong with your repository

@retorquere
Copy link

But another option would be to publish only the generated javascript, right? I could just rename the ts files to something else so they wouldn't be picked up by atom.

@icecream17
Copy link
Contributor

Yeah, I think that would work. Should I open another issue for this then?

@retorquere
Copy link

No, the current issue is fine, the renaming would be a workaround I'd want to get rid of.

@retorquere
Copy link

typescript does not tolerate different file extensions unfortunately.

@retorquere
Copy link

I've created a custom compiler using the TS library, and that works, but this is something I'd want to be rid of. It's only a workaround.

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

No branches or pull requests

4 participants
@retorquere @icecream17 @ReedMerrill and others