Topic: CAN NOT INSTALL MDB ANGULAR PRO

rich@cfsnap.com pro asked 6 years ago


CAN NOT INSTALL FAILED TO COMPILE I just purchased the Angular MDB Pro. Let me mention that i've successfully been running about a dozen different Angular projects on this box so I know it's been working and installed correctly.... I'm on Mac OSX 10.11.6 I'm following the instructions on this page: https://mdbootstrap.com/angular/5min-quickstart/ There are so many different errors I'm not sure which to list first.... I completed the first 2 steps without error: Step 1:  npm i -g @angular/cli Step 2:  npm i -g typescript   I downloaded and unzipped the files. I copied the files to my new angular project and ran npm -i. This command resulted in a few hundred lines of errors, all of which complained of 'which' failed.... When I ran 'ng serve' (I couldn't run ng serve -O, it complained the switch didn't exist) I got the following error: ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss Module build failed: Error: Cannot find module 'node-sass'   I can blow away my local installation if you think it will help, but right now I can't use your Angular MDB Pro....   Please advise, Thanks, Rich  

rich@cfsnap.com pro commented 6 years ago

Has anyone gotten MDB Pro installed on Mac OSX 10.11.6? Thanks, Rich

vizmedia pro commented 6 years ago

try to reinstall angular-cli https://github.com/angular/angular-cli

rich@cfsnap.com pro commented 6 years ago

Hi. I ran these commands early on in my process: npm uninstall -g angular-cli npm cache clean npm install -g @angular/cli@latest ... and I had some work to do just today where I generated a new project, all seems to be working well.... Rich

rich@cfsnap.com pro answered 6 years ago


Another developer has discovered some installation issues as well, perhaps they're relevant? https://mdbootstrap.com/support/alternative-installation-procedure-for-mdb-angular-pro/ Thanks, Rich

rich@cfsnap.com pro answered 6 years ago


When I attempt to run this command:
sudo npm install git+https://oauth2:@git.mdbootstrap.com/mdb/angular/ng-pro.git -save
it says the -save switch is invalid. I have to use --save instead (I copied and pasted from the docs, which are incorrect)

With
sudo npm install git+https://oauth2:@git.mdbootstrap.com/mdb/angular/ng-pro.git --save
I get
Command failed: /usr/local/bin/git clone -q https://oauth2:@git.mdbootstrap.com/mdb/angular/ng-pro.git /Users/rich/.npm/_cacache/tmp/git-clone-025d2428
npm ERR! /Users/rich/.npm/_cacache/tmp/git-clone-025d2428/.git: Permission denied
Could you please tell me what commands I need to remedy this?

Thanks,

Rich


rich@cfsnap.com pro answered 6 years ago


Hello again Dawid I just attempted a clean install once again, this time using the manual installation instructions listed on https://mdbootstrap.com/angular/5min-quickstart/ From my Desktop/ I successfully ran the 2 prerequisite steps, as instructed. I created my project folder Desktop/angularrichleach/ and copied the unzipped contents from the downloaded .zip file into it. cd /angularrichleach sudo npm i

Richs-Mac-Pro:angularrichleach rich$ sudo npm i

npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

> fsevents@1.1.3 install /Users/rich/Desktop/angularrichleach/node_modules/fsevents

> node install

[fsevents] Success: "/Users/rich/Desktop/angularrichleach/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed

Pass --update-binary to reinstall or --build-from-source to recompile

> node-sass@4.7.2 install /Users/rich/Desktop/angularrichleach/node_modules/node-sass

> node scripts/install.js

Unable to save binary /Users/rich/Desktop/angularrichleach/node_modules/node-sass/vendor/darwin-x64-48 : { Error: EACCES: permission denied, mkdir '/Users/rich/Desktop/angularrichleach/node_modules/node-sass/vendor'

    at Error (native)

    at Object.fs.mkdirSync (fs.js:924:18)

    at sync (/Users/rich/Desktop/angularrichleach/node_modules/mkdirp/index.js:71:13)

    at Function.sync (/Users/rich/Desktop/angularrichleach/node_modules/mkdirp/index.js:77:24)

    at checkAndDownloadBinary (/Users/rich/Desktop/angularrichleach/node_modules/node-sass/scripts/install.js:111:11)

    at Object.<anonymous> (/Users/rich/Desktop/angularrichleach/node_modules/node-sass/scripts/install.js:154:1)

    at Module._compile (module.js:570:32)

    at Object.Module._extensions..js (module.js:579:10)

    at Module.load (module.js:487:32)

    at tryModuleLoad (module.js:446:12)

  errno: -13,

  code: 'EACCES',

  syscall: 'mkdir',

  path: '/Users/rich/Desktop/angularrichleach/node_modules/node-sass/vendor' }

> uglifyjs-webpack-plugin@0.4.6 postinstall /Users/rich/Desktop/angularrichleach/node_modules/@angular/cli/node_modules/webpack/node_modules/uglifyjs-webpack-plugin

> node lib/post_install.js

> uglifyjs-webpack-plugin@0.4.6 postinstall /Users/rich/Desktop/angularrichleach/node_modules/webpack/node_modules/uglifyjs-webpack-plugin

> node lib/post_install.js

> node-sass@4.7.2 postinstall /Users/rich/Desktop/angularrichleach/node_modules/node-sass

> node scripts/build.js

Building: /usr/local/bin/node /Users/rich/Desktop/angularrichleach/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=

gyp info it worked if it ends with ok

gyp verb cli [ '/usr/local/bin/node',

gyp verb cli   '/Users/rich/Desktop/angularrichleach/node_modules/node-gyp/bin/node-gyp.js',

gyp verb cli   'rebuild',

gyp verb cli   '--verbose',

gyp verb cli   '--libsass_ext=',

gyp verb cli   '--libsass_cflags=',

gyp verb cli   '--libsass_ldflags=',

gyp verb cli   '--libsass_library=' ]

gyp info using node-gyp@3.6.2

gyp info using node@6.11.3 | darwin | x64

gyp verb command rebuild []

gyp verb command clean []

gyp verb clean removing "build" directory

gyp verb command configure []

gyp verb check python checking for Python executable "python2" in the PATH

gyp verb `which` failed Error: not found: python2

gyp verb `which` failed     at getNotFoundError (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:13:12)

gyp verb `which` failed     at F (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:68:19)

gyp verb `which` failed     at E (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:80:29)

gyp verb `which` failed     at /Users/rich/Desktop/angularrichleach/node_modules/which/which.js:89:16

gyp verb `which` failed     at /Users/rich/Desktop/angularrichleach/node_modules/isexe/index.js:42:5

gyp verb `which` failed     at /Users/rich/Desktop/angularrichleach/node_modules/isexe/mode.js:8:5

gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)

gyp verb `which` failed  python2 { Error: not found: python2

gyp verb `which` failed     at getNotFoundError (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:13:12)

gyp verb `which` failed     at F (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:68:19)

gyp verb `which` failed     at E (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:80:29)

gyp verb `which` failed     at /Users/rich/Desktop/angularrichleach/node_modules/which/which.js:89:16

gyp verb `which` failed     at /Users/rich/Desktop/angularrichleach/node_modules/isexe/index.js:42:5

gyp verb `which` failed     at /Users/rich/Desktop/angularrichleach/node_modules/isexe/mode.js:8:5

gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:123:15)

gyp verb `which` failed   stack: 'Error: not found: python2n    at getNotFoundError (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:13:12)n    at F (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:68:19)n    at E (/Users/rich/Desktop/angularrichleach/node_modules/which/which.js:80:29)n    at /Users/rich/Desktop/angularrichleach/node_modules/which/which.js:89:16n    at /Users/rich/Desktop/angularrichleach/node_modules/isexe/index.js:42:5n    at /Users/rich/Desktop/angularrichleach/node_modules/isexe/mode.js:8:5n    at FSReqWrap.oncomplete (fs.js:123:15)',

gyp verb `which` failed   code: 'ENOENT' }

gyp verb check python checking for Python executable "python" in the PATH

gyp verb `which` succeeded python /usr/bin/python

gyp verb check python version `/usr/bin/python -c "import platform; print(platform.python_version());"` returned: "2.7.10n"

gyp verb get node dir no --target version specified, falling back to host node version: 6.11.3

gyp verb command install [ '6.11.3' ]

gyp verb install input version string "6.11.3"

gyp verb install installing version: 6.11.3

gyp verb install --ensure was passed, so won't reinstall if already installed

gyp verb install version is already installed, need to check "installVersion"

gyp verb got "installVersion" 9

gyp verb needs "installVersion" 9

gyp verb install version is good

gyp verb get node dir target node version installed: 6.11.3

gyp verb build dir attempting to create "build" dir: /Users/rich/Desktop/angularrichleach/node_modules/node-sass/build

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/rich/Desktop/angularrichleach/node_modules/node-sass/build'

gyp ERR! stack     at Error (native)

gyp ERR! System Darwin 15.6.0

gyp ERR! command "/usr/local/bin/node" "/Users/rich/Desktop/angularrichleach/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="

gyp ERR! cwd /Users/rich/Desktop/angularrichleach/node_modules/node-sass

gyp ERR! node -v v6.11.3

gyp ERR! node-gyp -v v3.6.2

gyp ERR! not ok

Build failed with error code: 1

npm notice created a lockfile as package-lock.json. You should commit this file.

npm WARN @ng-bootstrap/ng-bootstrap@1.0.0-beta.5 requires a peer of @angular/core@^4.0.3 but none is installed. You must install peer dependencies yourself.

npm WARN @ng-bootstrap/ng-bootstrap@1.0.0-beta.5 requires a peer of @angular/common@^4.0.3 but none is installed. You must install peer dependencies yourself.

npm WARN @ng-bootstrap/ng-bootstrap@1.0.0-beta.5 requires a peer of @angular/forms@^4.0.3 but none is installed. You must install peer dependencies yourself.

npm WARN ng-html-util@1.0.0 requires a peer of @angular/core@^4.0.3 but none is installed. You must install peer dependencies yourself.

npm WARN ng-html-util@1.0.0 requires a peer of @angular/common@^4.0.3 but none is installed. You must install peer dependencies yourself.

npm WARN ng-html-util@1.0.0 requires a peer of @angular/platform-browser@^4.0.3 but none is installed. You must install peer dependencies yourself.

npm WARN codelyzer@3.2.2 requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN codelyzer@3.2.2 requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN license-webpack-plugin@1.1.1 requires a peer of webpack-sources@>=1.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.7.2 (node_modules/node-sass):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.7.2 postinstall: `node scripts/build.js`

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 1608 packages in 47.556s
  ng serve -o
Your global Angular CLI version (1.6.3) is greater than your local

version (1.5.0). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".

@angular/compiler-cli@5.1.3 requires typescript@'>=2.4.2 <2.5.0' but 2.5.3 was found instead.

Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

    npm install typescript@'>=2.4.2 <2.5.0'

To disable this warning run "ng set warnings.typescriptMismatch=false".

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

 10% building modules 5/5 modules 0 activewebpack: wait until bundle finished: /   

Date: 2018-01-08T19:15:15.339Z                                                          

Hash: e6f2e2c86d610d062c86

Time: 25310ms

chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]

chunk {main} main.bundle.js (main) 2.17 MB [initial] [rendered]

chunk {polyfills} polyfills.bundle.js (polyfills) 1.11 MB [initial] [rendered]

chunk {styles} styles.bundle.js (styles) 46.7 kB [initial] [rendered]

chunk {vendor} vendor.bundle.js (vendor) 11.5 MB [initial] [rendered]

ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss

Module build failed: Error: Cannot find module 'node-sass'
webpack: Failed to compile. I hope this helps, please let me know if you need clarification on any of these steps and/or results. Regards, Rich

Dawid Adach pro commented 6 years ago

Rich, this error "Unable to save binary /Users/rich/Desktop/angularrichleach/node_modules/node-sass/vendor/darwin-x64-48 : { Error: EACCES: permission denied, mkdir '/Users/rich/Desktop/angularrichleach/node_modules/node-sass/vendor' " says that you have not permission to write in a given folder. please try to run i with sudo

rich@cfsnap.com pro commented 6 years ago

Gentlemen I have been using sudo, I'm still getting these same issues. Please advise.

rich@cfsnap.com pro answered 6 years ago


Hi Dawid

  1. Correct, when I used the -o option it worked. Please check your documentation, as it is posted incorrectly, as states "-0" (it uses the zero character, and when I copied and pasted that's when it blows up).
  2. I sent you a reply email this morning with a link to where you can download my project - as I couldn't email it as an attachment due to security issues.
  3. I will look into the issue of "not depending on angular core...", thank you for the link.

I've been trying to reinstall again this morning, using the NPM installation instructions located on this page: https://mdbootstrap.com/angular/5min-quickstart/

When I get to step 7 to do the npm install command, and when I ran that with my string of credentials:
sudo npm install git+https://oauth2<TOKEN>@git.mdbootstrap.com/mdb/angular/ng-pro.git --save
I received the following errors:

Richs-Mac-Pro:angularrichleach rich$ sudo npm install git+https://oauth2:<TOKEN>@git.mdbootstrap.com/mdb/angular/ng-pro.git --save

npm ERR! code 1

npm ERR! Command failed: /usr/local/bin/git clone -q https://oauth2:<TOKEN>@git.mdbootstrap.com/mdb/angular/ng-pro.git /Users/rich/.npm/_cacache/tmp/git-clone-21e66897

npm ERR! /Users/rich/.npm/_cacache/tmp/git-clone-21e66897/.git: Permission denied

npm ERR!

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/rich/.npm/_logs/2018-01-08T18_52_23_814Z-debug.log

Richs-Mac-Pro:angularrichleach rich$ 

Could you please double check my account to ensure it hasn't been deactivated? I'm not sure what to try next.... Please advise.

Thank you again for your help.

 

Rich

 


Dawid Adach pro commented 6 years ago

Hello Rich, I've checked your token and everything is fine, I've managed to instal MDB PRO using your token. This error can be misleading. Permission denied doesn't imply access to the repository, it complains about access to your local file : /Users/rich/.npm/_cacache/tmp/git-clone-21e66897/.git: which means that user which is running npm install doesn't have sufficient privileges on that machine. Please try to prefix installation command with "sudo"

Dawid Adach pro answered 6 years ago


Dear Rich, 1) -o option is default option for Angular CLI , pleae make sure to use -o (lower case) instead of -O (upper case) 2) Could you please zip your project and send it to me (without node_modules, you should remove them before zipping) and mail it to me (d.adach@mdbootstrap.com) 3) Meanwhile you can check following thread: https://stackoverflow.com/questions/41534459/you-seem-to-not-be-depending-on-angular-core-this-is-an-error

Dawid Adach pro commented 6 years ago

Could you also check ,wheter your node_modules folder contains @angular folders in it?

rich@cfsnap.com pro commented 6 years ago

Yes, the @angular folders are present: @angular @angular-devkit

rich@cfsnap.com pro answered 6 years ago


I've tried this installation on a second Mac, where angular was not installed so I did a fresh install of angular and all of the required supporting libraries. I then followed the instructions at https://mdbootstrap.com/angular/5min-quickstart/ When I completed the installation I ran "ng serve" (I attempted to run "ng serve -o" as instructed but the -o switch is never recognized, does the documentation need updating?) I received the following error: "You seem to not be depending on "@angular/core". This is an error." I also received this error on my first computer as well.... I hope this helps, I'm anxious to use MDB. Awaiting your response, Thanks, Rich

rich@cfsnap.com pro answered 6 years ago


Hi Dawid I meant to ask, which installation method did you have success with? I've tried both numerous times with no success. Thanks,   Rich

rich@cfsnap.com pro answered 6 years ago


Hi Dawid

Angular CLI: 1.6.3

Node: 6.11.3

OS: darwin x64

TSC -V: Version 2.6.2 Ran "ng serve" on a newly created project ("ng new angularrichleach --style=scss") SUCCESSFUL, SITE VISIBLE IN BROWSER AT http://localhost:4200 Thanks for your help and I'm happy to provide any other details you think might help, just ask! Rich

Dawid Adach pro answered 6 years ago


Dear rich,

could you please

  1. Provide us with a version of your Angular, CLI, npm and typescript?
  2. Run ng serve on the new empty project?

This looks like an issue with your Angular installation. Plese, verify that it was installed correctly. Could you also check second option (npm).

 

PS

I've just managed to run fresh MDB project on my MacOS Sierra 10.12.6 (16G1036)



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No
Tags