particle-iot-archived / particle-dev-libraries

Particle Dev support for Libraries
Apache License 2.0
3 stars 2 forks source link

Failed to activate the particle-dev-libraries package #32

Closed patrickxchong closed 7 years ago

patrickxchong commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.0 x64 Electron: 1.6.9 OS: Linux Mint Thrown From: particle-dev-libraries package 0.2.23

Stack Trace

Failed to activate the particle-dev-libraries package

At ENOENT, node_modules/typescript/bin/lib.d.ts not found in /usr/share/atom/resources/app.asar

Error: ENOENT, node_modules/typescript/bin/lib.d.ts not found in /usr/share/atom/resources/app.asar
    at notFoundError (ELECTRON_ASAR.js:115:19)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:514:9)
    at TypeScriptSimple.createService (/usr/share/atom/resources/app/node_modules/typescript-simple/index.js:71:73)
    at TypeScriptSimple.compile (/usr/share/atom/resources/app/node_modules/typescript-simple/index.js:60:43)
    at Object.exports.compile (/usr/share/atom/resources/app/src/typescript.js:54:53)
    at Object.compile (/usr/share/atom/resources/app/src/package-transpilation-registry.js:79:33)
    at compileFileAtPath (/usr/share/atom/resources/app/src/compile-cache.js:97:37)
    at Object.value [as .ts] (/usr/share/atom/resources/app/src/compile-cache.js:238:26)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
    at /packages/particle-dev-libraries/lib/library_init.js:10:50)
    at /packages/particle-dev-libraries/lib/library_init.js:305:2)
    at Module.get_Module._compile (/usr/share/atom/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (/usr/share/atom/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
    at /packages/particle-dev-libraries/lib/index_loophole.js:8:58)
    at /packages/particle-dev-libraries/lib/index_loophole.js:60:11)
    at Module.get_Module._compile (/usr/share/atom/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (/usr/share/atom/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
    at /packages/particle-dev-libraries/lib/index.js:17:10
    at exports.allowUnsafeNewFunction (/packages/particle-dev-libraries/node_modules/loophole/lib/loophole.js:25:14)
    at Object.activate (/packages/particle-dev-libraries/lib/index.js:15:2)
    at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app/src/package.js:253:25)
    at /usr/share/atom/resources/app/src/package.js:225:38
    at Package.module.exports.Package.measure (/usr/share/atom/resources/app/src/package.js:99:21)
    at /usr/share/atom/resources/app/src/package.js:218:32
    at Package.module.exports.Package.activate (/usr/share/atom/resources/app/src/package.js:215:40)
    at PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:690:42)
    at /packages/particle-dev-complete/node_modules/atom-package-deps/lib/index.js:37:35
    at Generator.next (<anonymous>)
    at step (/packages/particle-dev-complete/node_modules/atom-package-deps/lib/index.js:67:191)
    at /packages/particle-dev-complete/node_modules/atom-package-deps/lib/index.js:67:361

Commands

  2x -2:47.8.0 particle-dev:update-menu (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

particle-dev 0.2.0 
particle-dev-cloud-functions 0.2.0 
particle-dev-cloud-variables 0.2.0 
particle-dev-complete 1.0.2 
particle-dev-libraries 0.2.23 
particle-dev-profiles 0.2.3 
tool-bar 1.1.0 
suda commented 7 years ago

Hi Patrick, this issue seems to be related to the Atom compile cache rather than Particle Dev Libraries. Could you try removing ~/.atom/compile-cache dir and restart Atom?

rudam commented 7 years ago

Hi. I got the same error after installation of particle-dev package to the Atom.

image

[Enter steps to reproduce:]

  1. Install package particle-dev
  2. (Re)start Atom

Atom: 1.21.0 x64 Electron: 1.6.9 OS: Microsoft Windows 10 Pro Thrown From: particle-dev-libraries package 0.2.23

Stack Trace

Failed to activate the particle-dev-libraries package

At ENOENT, node_modules\typescript\bin\lib.d.ts not found in C:\Users\Michal\AppData\Local\atom\app-1.21.0\resources\app.asar

Error: ENOENT, node_modules\typescript\bin\lib.d.ts not found in C:\Users\Michal\AppData\Local\atom\app-1.21.0\resources\app.asar
    at notFoundError (ELECTRON_ASAR.js:115:19)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:514:9)
    at TypeScriptSimple.createService (~/AppData/Local/atom/app-1.21.0/resources/app/node_modules/typescript-simple/index.js:71:73)
    at TypeScriptSimple.compile (~/AppData/Local/atom/app-1.21.0/resources/app/node_modules/typescript-simple/index.js:60:43)
    at Object.exports.compile (~/AppData/Local/atom/app-1.21.0/resources/app/src/typescript.js:54:53)
    at Object.compile (~/AppData/Local/atom/app-1.21.0/resources/app/src/package-transpilation-registry.js:79:33)
    at compileFileAtPath (~/AppData/Local/atom/app-1.21.0/resources/app/src/compile-cache.js:97:37)
    at Object.value [as .ts] (~/AppData/Local/atom/app-1.21.0/resources/app/src/compile-cache.js:238:26)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (~/AppData/Local/atom/app-1.21.0/resources/app/src/native-compile-cache.js:66:33)
    at /packages/particle-dev-libraries/lib/library_init.js:10:50)
    at /packages/particle-dev-libraries/lib/library_init.js:305:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.21.0/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.21.0/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)
    at require (~/AppData/Local/atom/app-1.21.0/resources/app/src/native-compile-cache.js:66:33)
    at /packages/particle-dev-libraries/lib/index_loophole.js:8:58)
    at /packages/particle-dev-libraries/lib/index_loophole.js:60:11)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.21.0/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (~/AppData/Local/atom/app-1.21.0/resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (/app.asar/static/index.js:47:45)

Commands

Non-Core Packages

language-ballerina 0.8.0 
language-particle 0.3.5 
particle-dev-cloud-functions 0.2.0 
particle-dev-cloud-variables 0.2.0 
particle-dev-complete 1.0.2 
particle-dev-libraries 0.2.23 
particle-dev-profiles 0.2.3 
language-ballerina 0.8.0 
tool-bar 1.1.0 
suda commented 7 years ago

This seems to be Windows specific error. We'll look into it!

axjensen commented 7 years ago

I have the same error on Ubuntu 16.04 (or I have some dependencies not resolved).

patrickxchong commented 7 years ago

@suda I tried your fix, deleted ~/.atom/compile-cache and restarted Atom but it didn't work. I'm running Linux Mint but I think the issue is cross platform here. Appreciate your help!

Andrewwalker27 commented 7 years ago

Same error on Ubuntu 17.04 using atom-0.6.2, definitely not just Windows affected. Just upgraded to Ubuntu 17.10 and still broken.

bloukingfisher commented 7 years ago

Same error with Atom 1.21.2 on Windows 10 with fall creators update

anbugge commented 7 years ago

Same error here, Ubuntu 17.10. I reverted Atom to 1.20.1, seems to work fine there.

suda commented 7 years ago

Yes, this seems to be a bug in Atom itself. The easiest solution for us would be to get rid of any TypeScript code in this package.

suda commented 7 years ago

We just released v0.2.24 which should fix this issue. Can you confirm that it did?

bloukingfisher commented 7 years ago

particle-dev-libraries now installs without error for me

jventerprises commented 7 years ago

worked for me as well, although i did have to disable Norton Security to get the installer to work