Errors starting frontend on angular project visual studio code - node.js

I got this error when I just download and npm/install/run this angular based project.
https://github.com/OpenClassrooms-Student-Center/dwj-projet6
Instructions :
Clone project
Execute npm install
Execute npm start.
API execution on http://localhost:3000
Errors
ng serve
Your global Angular CLI version (11.2.6) is greater than your local version (7.0.7). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
Error: Schema validation failed with the following errors:
Data path ".builders['app-shell']" should have required property 'class'.
at MergeMapSubscriber.project (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\#angular-devkit\core\src\workspace\workspace.js:215:42)
at MergeMapSubscriber._tryNext (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
at MergeMapSubscriber._next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\Subscriber.js:67:18)
at MergeMapSubscriber.notifyNext (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
at InnerSubscriber._next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\Subscriber.js:67:18)
at MapSubscriber._next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\map.js:55:26)
at MapSubscriber.Subscriber.next (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\Subscriber.js:67:18)
at SwitchMapSubscriber.notifyNext (C:\Users\Phil\Desktop\Beta\dwj-projet6\node_modules\rxjs\internal\operators\switchMap.js:86:26)
Thank you

It's works fine for me.
Try below way maybe it help you
Solution 1: Delete node_modules folder and run npm install.
Solution 2: I think you should decrease your angular CLI version, try with CLI version 8.

Related

Node.js native addon module (tfjs_binding.node) can not be found

I am writing an Electron application and would like to integrate my AI. For this I have installed #tensorflow/tfjs-node version 3.0.0. When I want to execute my code (const tf = require("#tensorflow/tfjs-node");) the following error message appears in the console:
Uncaught (in promise) Error: The Node.js native addon module (tfjs_binding.node) can not be found at path: C:\...\simplePhishNew\node_modules\#tensorflow\tfjs-node\lib\napi-v6\tfjs_binding.node.
Please run command 'npm rebuild #tensorflow/tfjs-node build-addon-from-source' to rebuild the native addon module.
The Console is tell me:
node-pre-gyp info This Node instance does not support builds for N-API version 7
The Solution,
Please run command 'npm rebuild #tensorflow/tfjs-node build-addon-from-source' to rebuild the native addon module.
doesnt work and is showing the following error message.
CPU-windows-3.0.0.zip
* Building TensorFlow Node.js bindings
symlink ./lib/napi-v7 failed: null
#tensorflow/tfjs-node#3.0.0 C:\...\node_modules\#tensorflow\tfjs-node
Thanks for the effort
I did it guys...
Step 1:
Stop crying
Step 2:
Call the boss again and take back the notice of termination
Step 3:
Electron need a specific node version
https://github.com/electron/releases
For example Electron v. 11.3.0 needs node 12.18.3
Step 4:
Ask yourself why you actually got the job

WebpackOptionsValidationError: configuration plugins[12] misses the property apply

I recently upgraded my project from vuetify 1.5 to 2.1.. I also updated the required dependencies and installed fibers, deepmerge, sass, sass-loader in devdependencies.
Now when I run "yarn serve" it throws following error.
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.plugins[12] misses the property 'apply'.
function
-> The run point of the plugin, required method.
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.plugins[12] misses the property 'apply'.
function
-> The run point of the plugin, required method.
at webpack (/home/usman/projects/project-crm/frontend/node_modules/webpack/lib/webpack.js:31:9)
at serve (/home/usman/projects/project-crm/frontend/node_modules/#vue/cli-service/lib/commands/serve.js:137:22)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
error Command failed with exit code 1.
I don't have a clue where is this error occuring. I searched on internet but didn't found solution on
this error...
configuration.plugins[12] misses the property 'apply'.
OK people!!!
I've found a solution(trick). Off course it is a trick the way I see it but it is working absolutely fine to me. Remember this error happened to me due to upgrade from vuetify 1.5 to 2.1....
Steps I took were,
Created a new project(name = candy) with latest Vue and Vuetify.
Installed all dependencies and devDependencies in this new project(candy in my case) which I had in my original projects package.json file.
You can open package.json file of your original project and terminal in new project(candy) and run commands yarn add "package name in original project or npm install "package name.
Then copied this(candy) package.json file and pasted it in my original project folder and renamed these files and folder to old.
File & folder == node_modules to node_modules_old, package.json to package_old.json, vue.config.js to vue.config_old.js, yarn.lock to yarn_old.lock.
Copy only package.json of candy project to the original project's folder.
Run command yarn install or npm install.
And the server runs now.
Further, you will have to set your code according to the project. It can be in vue.config.js mostly or in babel config file or webpack.config.js.

node 6.11.3 NODE_EXE not found in IntelliJ

I've updated my project to use node 6.11.3. When I now try to start a npm-script by using the Run-configurations provided from IntelliJ, I always receive the following error:
Error: Failed to replace env in config: ${NODE_EXE}
Important: This error appears only if I start npm from within my project. If I use the windows cmd, the error doesn't appear.
What could possibly have changed between node 6.11.2 and 6.11.3? Because with the prior version, everything worked fine.
A workaround for me is to add the NODE_EXE variable to my run configuration, but In my opinion, that shouldn't be needed, because it worked in 6.11.2 too.
Looks as if you have ${NODE_EXE} variable set in one of your npmrc files (see https://docs.npmjs.com/files/npmrc#files), and it can't be properly expanded for some reason when you run your script in the IDE.
is the issue specific to certain project?
how many npm versions do you have installed? Please check that npm chosen in Node.js Interpreters dialog is the same as you use in cmd shell?
please create an env.js file with console.log(process.env) and try running it via npm ("env" : "node env.js") in both cmd console and WebStorm - what is the result?

No ember-cli-build.js found

I'm trying run an Ember project locally : https://github.com/cosmicjs/ember-real-estate-website?files=1. I'm using pycharm 2017 using git-bash as my terminal in win7. I have npm , node and ember installed . In pycharm my project looks like the screenshot.
I've been advised to build the project (Emberjs: Failed to find a valid digest in the 'integrity' attribute , although this is not discussed in the instructions):
$ ember build
Running without permission to symlink will degrade build performance.
See http://ember-cli.com/user-guide/#windows for details.
- BuildingNo ember-cli-build.js found.
You can see the file in the screenshot. What am I doing wrong?

Deploying NodeJS/Babel/Grunt app on Heroku

I'm trying to deploy my project on Heroku. I've been able to heroku open the app and see it but I get a 404 on my bundle.js. The app is on github here. The app is on heroku here.
I've tried making sure my dependencies are all there regarding babel, babelify, grunt, etc. But I must be still missing something.
I don't get any errors after my git push heroku but I still get my 404.
I am able to recreate this locally as well. This is what I get when I run your postinstall script code:
$ npm run postinstall
> ncps-mms#0.0.0 postinstall ncps-mms
> gulp transpile --gulpfile client/gulpfile.babel.js
[00:18:43] Requiring external module babel-register
[00:18:43] Working directory changed to ncps-mms/client
(node:30276) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[00:18:43] Using gulpfile ncps-mms/client/gulpfile.babel.js
[00:18:44] Starting 'transpile'...
Error: Cannot find module './controllers/members-detail-controller' from 'ncps-mms/client/src'
[00:18:44] Finished 'transpile' after 184 ms
I see this error:
Error: Cannot find module './controllers/members-detail-controller' from 'ncps-mms/client/src'
The members-detail-controller is missing - See: https://github.com/gh0st/ncps-mms/tree/master/client/src/controllers.
If I comment out the following lines, https://github.com/gh0st/ncps-mms/blob/master/client/src/app.js#L4 and https://github.com/gh0st/ncps-mms/blob/master/client/src/app.js#L15 then run npm run postinstall again, the gulp tasks run without errors. I am then able to start the server without the 404's on bundle.js.

Resources