Closed laszewsk closed 4 years ago
it no longer starts
I'm am not able to reproduce this this. What is the cms viewer
command that you ran when you got this error?
I completely blew away my cloudmesh-javascript
directory, reinstalled it, and ran start without any issues.
e.g.
rm -rf cloudmesh-javascript
cloudmesh-installer get javascript
cms viewer start
Running from the develop branch also gave the same result.
rm -rf cloudmesh-javascript
cloudmesh-installer get javascript
cms viewer start --branch=develop
can you add to the documentation a description where things are installed and how to delte them by hand
i still can not start it on osx ...
After installing this on 3 clean OS X systems and failing to reproduce this I have a theory on how it might be happening on your system. I unfortunately have been unable to recreate an environment that will produce your exact error so I cannot fully test this theory.
During the installs I noticed that the cloudmesh-installer get javascript
command was executing a yarn
command and not yarnpkg
. If you don't have yarn installed or have Apache Hadoop yarn installed the command will die causing the rest of the install to fail and the cms viewer command to not be properly installed.
In this case, the cms viewer command should not work since it is not installed. However, I think in your particular case an older version of the cms viewer command is installed and continues to be executed because the newer code is not replacing it during the install.
To test this you can run the pip install -e .
command in the cloudmesh-javascript directory and then try to execute the cms viewer start
command. I've also made a PR on the installer repo to correct the command in the installer.
here is my log
grey@gray cloudmesh-javascript % which yarn /usr/local/bin/yarn grey@gray cloudmesh-javascript % yarn --version 1.22.4 grey@gray cloudmesh-javascript % yarn --help
Usage: yarn [command] [flags]
Displays help information.
Options:
--cache-folder <path> specify a custom folder that must be used to store the yarn cache
--check-files install will verify file tree of packages for consistency
--cwd <cwd> working directory to use (default: /Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript)
--disable-pnp disable the Plug'n'Play installation
--emoji [bool] enable emoji in output (default: true)
--enable-pnp, --pnp enable the Plug'n'Play installation
--flat only allow one version of a package
--focus Focus on a single workspace by installing remote copies of its sibling workspaces.
--force install and build packages even if they were built before, overwrite lockfile
--frozen-lockfile don't generate a lockfile and fail if an update is needed
--global-folder <path> specify a custom folder to store global packages
--har save HAR output of network traffic
--https-proxy <host>
--ignore-engines ignore engines check
--ignore-optional ignore optional dependencies
--ignore-platform ignore platform checks
--ignore-scripts don't run lifecycle scripts
--json format Yarn log messages as lines of JSON (see jsonlines.org)
--link-duplicates create hardlinks to the repeated modules in node_modules
--link-folder <path> specify a custom folder to store global links
--modules-folder <path> rather than installing modules into the node_modules folder relative to the cwd, output them here
--mutex <type>[:specifier] use a mutex to ensure only one yarn instance is executing
--network-concurrency <number> maximum number of concurrent network requests
--network-timeout <milliseconds> TCP timeout for network requests
--no-bin-links don't generate bin links when setting up packages
--no-default-rc prevent Yarn from automatically detecting yarnrc and npmrc files
--no-lockfile don't read or generate a lockfile
--non-interactive do not show interactive prompts
--no-node-version-check do not warn when using a potentially unsupported Node version
--no-progress disable progress bar
--offline trigger an error if any required dependencies are not available in local cache
--otp <otpcode> one-time password for two factor authentication
--prefer-offline use network only if dependencies are not available in local cache
--preferred-cache-folder <path> specify a custom folder to store the yarn cache if possible
--prod, --production [prod]
--proxy <host>
--pure-lockfile don't generate a lockfile
--registry <url> override configuration registry
-s, --silent skip Yarn console logs, other types of logs (script output) will be printed
--scripts-prepend-node-path [bool] prepend the node executable dir to the PATH in scripts
--skip-integrity-check run install without checking if node_modules is installed
--strict-semver
--update-checksums update package checksums from current repository
--use-yarnrc <path> specifies a yarnrc file that Yarn should use (.yarnrc only, not .npmrc) (default: )
-v, --version output the version number
--verbose output verbose messages on internal operations
-h, --help output usage information
Commands:
workspaces
Run yarn help COMMAND
for more information on specific commands.
Visit https://yarnpkg.com/en/docs/cli/ to learn more about Yarn.
grey@gray cloudmesh-javascript % yarn --upgrade yarn install v1.22.4 [1/4] 🔍 Resolving packages... success Already up-to-date. $ electron-builder install-app-deps • electron-builder version=22.6.0 • loaded configuration file=/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/electron-builder.yml ✨ Done in 1.23s. grey@gray cloudmesh-javascript % cms viewer start --clean viewer start --clean yarn install v1.22.4 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning " > @devexpress/dx-react-grid@2.6.2" has unmet peer dependency "@devexpress/dx-core@2.6.2". warning "@devexpress/dx-react-grid > @devexpress/dx-grid-core@2.6.2" has unmet peer dependency "@devexpress/dx-core@2.6.2". warning " > @devexpress/dx-react-grid-material-ui@2.6.2" has unmet peer dependency "@devexpress/dx-grid-core@2.6.2". warning " > babel-loader@8.1.0" has unmet peer dependency "webpack@>=2". [4/4] 🔨 Building fresh packages... $ electron-builder install-app-deps • electron-builder version=22.6.0 • loaded configuration file=/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/electron-builder.yml ✨ Done in 16.27s. yarn run v1.22.4 $ yarnpkg run format $ prettier --write "*/.{js,css}" jest.config.js 38ms main/background.js 42ms main/cloudmesh/tests/CmsBridge.test.js 10ms main/cloudmesh/CmsBridge.js 15ms main/cloudmesh/CmsWrapper.js 13ms main/constants.js 9ms main/helpers/create-window.js 17ms main/helpers/index.js 4ms main/utils.js 6ms renderer/components/Card/index.js 28ms renderer/components/CloudSelector/index.js 12ms renderer/components/CmsError/index.js 12ms renderer/components/DataTable/index.js 36ms renderer/components/DataTable/index.module.css 27ms renderer/components/DefaultCard/index.js 2ms renderer/components/DefaultCard/index.module.css 7ms renderer/components/FlavorsTable/index.js 11ms renderer/components/ImagesTable/index.js 12ms renderer/components/Main/index.js 13ms renderer/components/Main/index.module.css 5ms renderer/components/MainAppCard/index.js 4ms renderer/components/MiniCard/index.js 3ms renderer/components/MiniCard/index.module.css 3ms renderer/components/PageHeader/index.js 3ms renderer/components/PageHeader/index.module.css 4ms renderer/components/RefreshButton/index.js 3ms renderer/components/Sidebar/index.js 23ms renderer/components/Sidebar/index.module.css 5ms renderer/components/SizeFilter/index.js 5ms renderer/components/vm/CardView/index.js 3ms renderer/components/vm/CardView/index.module.css 2ms renderer/components/vm/Details/index.js 6ms renderer/components/vm/Details/themes/google.js 3ms renderer/components/vm/Details/themes/nicinabox.js 3ms renderer/components/vm/Details/themes/solarized.js 2ms renderer/components/vm/MiniCardView/index.js 12ms renderer/components/vm/MiniCardView/index.module.css 3ms renderer/components/vm/TableView/index.js 4ms renderer/components/VmTabs/index.js 12ms renderer/helpers/json-data-extractors.js 13ms renderer/hooks/cms.js 15ms renderer/mock-json-allvms.js 4ms renderer/next.config.js 3ms renderer/pages/_app.js 6ms renderer/pages/_app.module.css 2ms renderer/pages/flavors.js 4ms renderer/pages/flavors.module.css 2ms renderer/pages/global.css 2ms renderer/pages/images.js 8ms renderer/pages/images.module.css 3ms renderer/pages/index.js 2ms renderer/pages/profile.js 9ms renderer/pages/profile.module.css 3ms renderer/pages/settings/cms.js 7ms renderer/pages/settings/index.js 2ms renderer/pages/vm/details/[name].js 4ms renderer/pages/vm/list.js 9ms renderer/pages/vm/list.module.css 1ms renderer/styles/home.css 1ms $ nextron build [nextron] Clearing previous builds [nextron] Building renderer process Creating an optimized production build
Compiled successfully.
Automatically optimizing pages
Page Size First Load JS ┌ ○ / 2.35 kB 102 kB ├ └ css/5d0af4da660f27f50aa3.css 200 B ├ /_app 10.7 kB 99.3 kB ├ ○ /404 3.15 kB 102 kB ├ ○ /flavors 1.16 kB 195 kB ├ └ css/ed5cc5bb1df0aa17b663.css 202 B ├ ○ /images 1.21 kB 195 kB ├ └ css/31c535ca22a8a05531e8.css 176 B ├ ○ /profile 3.48 kB 121 kB ├ └ css/c330c7b97e1bd6821d72.css 97 B ├ ○ /settings 280 B 99.5 kB ├ ○ /settings/cms 51.1 kB 150 kB ├ └ css/885190b599df949a4b85.css 133 B ├ ○ /vm/details/[name] 27.1 kB 136 kB └ ○ /vm/list 7.52 kB 199 kB └ css/69f6750665e566d984a0.css 417 B
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) ○ (Static) automatically rendered as static HTML (uses no initial props) ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
using build directory: /Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/renderer/.next copying "static build" directory No "exportPathMap" found in "next.config.js". Generating map from "./pages" launching 7 workers copying "public" directory Exporting (10/10)
Export successful [nextron] Building main process Hash: 2a053642439df2cd99bb Version: webpack 4.43.0 Time: 1299ms Built at: 05/05/2020 12:12:08 AM Asset Size Chunks Chunk Names background.js 1.3 KiB 0 background background.js.map 4.53 KiB 0 [dev] background Entrypoint background = background.js background.js.map [0] ./main/background.js 341 bytes {0} [built] [failed] [1 error]
ERROR in ./main/background.js 24:26 Module parse failed: Unexpected token (24:26) File was processed with these loaders:
let VIRTUAL_ENV = process?.env?.VIRTUAL_ENV ?? null; let CMS_BIN = null; [nextron] Packaging - please wait a moment • electron-builder version=22.6.0 os=19.4.0 • loaded configuration file=/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/electron-builder.yml • writing effective config file=dist/builder-effective-config.yaml • packaging platform=darwin arch=x64 electron=8.2.5 appOutDir=dist/mac ⨯ Application entry file "app/background.js" in the "/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/dist/mac/cloudmesh-javascript.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration. stackTrace= Error: Application entry file "app/background.js" in the "/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/dist/mac/cloudmesh-javascript.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration. at error (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:7:12) at checkFileInArchive (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:33:11) at MacPackager.checkFileInPackage (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/platformPackager.ts:405:7) at MacPackager.sanityCheckPackage (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/platformPackager.ts:456:5) at MacPackager.doPack (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/platformPackager.ts:243:5) at MacPackager.pack (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/macPackager.ts:130:7) at Packager.doBuild (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/packager.ts:444:9) at executeFinally (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/builder-util/src/promise.ts:12:14) at Packager._build (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/packager.ts:373:31) at Packager.build (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/app-builder-lib/src/packager.ts:337:12) at executeFinally (/Users/grey/Desktop/github/cloudmesh-community/cm/cloudmesh-javascript/node_modules/builder-util/src/promise.ts:12:14) [nextron] See
dist
directory ✨ Done in 32.92s.
still does not work :(
i do not have hadoop installed and it pick up yarn i think ????
On my 30th install of the day I finally hit pay dirt with varying the version of nodejs. After trying various versions of 8.x (doesn't work, too old), 10.x (works), and LTS 12.x (works) I discovered that when using the current version of nodejs (14.x) you get exactly this error. Generally speaking, "current" versions of nodejs are released so that library authors can update and adapt their libraries to work with newer versions. For production apps such as this you only want to use LTS versions.
In this case, 14.x adds a breaking change to a library we are using so the solution is to uninstall 14.x and install the LTS nodejs version.
I'm making a note of this in the README.md.
works! maybe mermaide o som othe prg updated nodejs ...
this is essential for teh documentation many thanks on this
Uncaught Exception: Error: Cannot find module '/Users/grey/Applications/cloudmesh-javascript.app/Contents/Resources/app.asar/app/background.js' at Module._resolveFilename (internal/modules/cjs/loader.js:798:15) at Function../lib/common/reset-search-paths.ts.Module._resolveFilename (electron/js2c/browser_init.js:7620:16) at Object. (electron/js2c/browser_init.js:5829:37)
at Object../lib/browser/init.ts (electron/js2c/browser_init.js:5837:30)
at __webpack_require__ (electron/js2c/browser_init.js:20:30)
at electron/js2c/browser_init.js:84:18
at electron/js2c/browser_init.js:87:10
at NativeModule.compile (internal/bootstrap/loaders.js:287:5)
at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:222:8)
at loadNativeModule (internal/modules/cjs/helpers.js:23:9)