oracle / oraclejet

Oracle JET is a modular JavaScript Extension Toolkit for developers working on client-side applications.
https://oracle.com/jet
Other
504 stars 115 forks source link

ojet theme build failing with @oracle\oraclejet\package.json: ENOENT: no such file or directory #75

Open darshanputtaswamy opened 3 years ago

darshanputtaswamy commented 3 years ago

Following is my node and npm and JET version

$ node -v
v14.17.3

$ npm --version
6.14.13

$ ojet -v
Oracle JET Command Line Interface, version: 11.0.0

I am trying to follow https://www.oracle.com/webfolder/technetwork/jet/public_samples/JET-Theme-Builder-CSS-Vars/public_html/index.html?_ojCoreRouter=library

Once in the JET-Theme-Builder-CSS-Vars directory run the following commands:

  1. ojet restore
  2. ojet add theming
  3. ojet serve

Step 3 fails with the below error

$ ojet serve

Warning: Command is missing platform. Default to web.
Error: D:\Projects\MARC\test\JET-Theme-Builder-CSS-Vars\node_modules\@oracle\oraclejet\package.json: ENOENT: no such file or directory, open 'D:\Projects\MARC\test\JET-Theme-Builder-CSS-Vars\node_modules\@oracle\oraclejet\package.json'
    at Object.openSync (fs.js:498:3)
    at Object.readFileSync (fs.js:394:35)
    at Object.readFileSync (C:\Users\dpp\AppData\Roaming\npm\node_modules\@oracle\ojet-cli\node_modules\jsonfile\index.js:61:22)
    at Object.util.getJETVersion (C:\Users\dpp\AppData\Roaming\npm\node_modules\@oracle\ojet-cli\node_modules\@oracle\oraclejet-tooling\lib\util.js:698:20)
    at Object.versionNumber (C:\Users\dpp\AppData\Roaming\npm\node_modules\@oracle\ojet-cli\node_modules\@oracle\oraclejet-tooling\lib\validations.js:262:21)
    at _getValidThemeObject (C:\Users\dpp\AppData\Roaming\npm\node_modules\@oracle\ojet-cli\node_modules\@oracle\oraclejet-tooling\lib\validations.js:159:33)
    at _setValidThemeOption (C:\Users\dpp\AppData\Roaming\npm\node_modules\@oracle\ojet-cli\node_modules\@oracle\oraclejet-tooling\lib\validations.js:169:19)
    at Object._validateTheme [as theme] (C:\Users\dpp\AppData\Roaming\npm\node_modules\@oracle\ojet-cli\node_modules\@oracle\oraclejet-tooling\lib\validations.js:21:12)
    at _validateOptions (C:\Users\dpp\AppData\Roaming\npm\node_modules\@oracle\ojet-cli\node_modules\@oracle\oraclejet-tooling\lib\serve.js:151:24)
    at C:\Users\dpp\AppData\Roaming\npm\node_modules\@oracle\ojet-cli\node_modules\@oracle\oraclejet-tooling\lib\serve.js:81:26 {
  errno: -4058,
  syscall: 'open',
  code: 'ENOENT',
  path: 'D:\\Projects\\MARC\\test\\JET-Theme-Builder-CSS-Vars\\node_modules\\@oracle\\oraclejet\\package.json'
}
(node:14384) UnhandledPromiseRejectionWarning: undefined
(Use `node --trace-warnings ...` to show where the warning was created)
(node:14384) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:14384) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

There is no directory @oracle\oraclejet under node_modules

peppertech commented 3 years ago

You're a few days ahead of the game on this one. While the NPM packages for v11 have been released (about 3 hours ago) we have not actually done a GA release of JET v11 to the public. That will be happening at some point on Monday the 12th of July. The website update will contain the updated file that you are trying to download. Right now, you are getting the v10.1.0 release of the ThemeBuilder app and trying to run it with JET v11.

Please hang on for a few more days and then you should be golden.

peppertech commented 3 years ago

This should be working for you now if you want to start from the beginning with downloading the Theme Builder application. Sorry for the troubles.

berkcanersoy commented 3 years ago

Hi! I am also having the same issue when I am running the command 'ojet serve' . Could you please help me on this matter?