I'm pulling an Angular 6 project from our repo to my new laptop. My npm version is 6.9.0. My node version is 12.4.0. The project is an Angular 6.0.7 project. Globally I have Angular 6.0.8 installed, and locally (in my project), I have Angular CLI 6.0.8 but below that where it lists the Angular version, it says Angular: <error>.
ng serve fails with the error Could not find module "#angular-devkit/build-angular" from "my-project-path". Thus I tried to install this via npm install --save-dev #angular-devkit/build-angular. However, this also failed with the error message:
npm ERR! code EINTEGRITY
npm ERR! sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== integrity checksum failed when using sha512: wanted sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== but got sha512-2lGfU4gymmhXRUiPLeQlnlkMaSY8azJB9W8e/vFp44AlAOEvzf6XiBUoTHO9NBM4OVlehybxDM9B4SwLBh42mw==. (10271 bytes)
...
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://registry.npmjs.org/app-root-path failed, reason: write EPROTO 11628:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
npm ERR!
I checked package-lock.json within my project, and in the file-saver object, the integrity key has sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== which is referenced in the error message as what npm wanted. I don't know why it got the other integrity value.
Any suggestions on how to resolve this EINTEGRITY error?
Related
I was installing NextJS when I encountered the following error:
D:\Codes\React\Learn>npx create-next-app
npm WARN using --force Recommended protections disabled.
npm WARN using --force Recommended protections disabled.
npm ERR! code E404
npm ERR! 404 File Not Found - GET https://skimdb.npmjs.com/registry/create-next-app
npm ERR! 404
npm ERR! 404 'create-next-app#latest' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache\_logs\2023-02-06T12_41_40_938Z-debug-0.log
Can anyone help me?
I wanted to work with NextJS......but I encountered this error!
You should give directory address in the installation command ,
Try : npx create-next-app#latest . if you want to install the packages in current directory or
npx create-next-app#latest YOUR_FOLDER_NAME and packages will be installed in new folder with the given name as YOUR_FOLDER_NAME.
Try this:
npm i -g create-next-app
It will install create next app globally. To create a next app run this command, if you want to install in current folder.
npx create-next-app
Otherwise, specify the folder name like,
npx create-next-app [your app name]
I created a React Native project with Expo using expo init MapTry. I am currently trying to install MapBox library into it. For some reason I get an error at the first step after trying to install it. I followed this guide of installation: https://github.com/rnmapbox/maps#Installation but for some reason I am getting an error message when I try to run npm install rnmapbox/maps#main --save from the terminal. The error says the following:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
I also tried to search for it in the official NPM site and found this one: https://www.npmjs.com/package/#rnmapbox/maps . After running the following code: npm i #rnmapbox/maps which was written there, I get the same error message as written above. What should I do? How can I use MapBox library in React Native?
try to run this command in your terminal
with NPM
npm install #rnmapbox/maps --save
with YARN
yarn add #rnmapbox/maps
Expected Behavior
npm run build should create the production dist bundle that I can serve on a given machine
Current Behavior
Despite being able to build locally, whenever I try to run npm run build on an external resource (such as a Digital Ocean VM or Heroku machine), I receive the below error.
Failure Logs
root#nodejs-lazyq-dev:/var/www/html/Vue# npm run build
> vue-material-dashboard-pro#1.0.0 build /var/www/html/Vue
> vue-cli-service build
⠴ Building for production...
ERROR Failed to compile with 1 errors 09:29:00
error in ./src/assets/scss/_material-dashboard.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
#import "md/plugins/fullCalendar";
^
File to import not found or unreadable: md/plugins/fullCalendar.
in /var/www/html/Vue/src/assets/scss/_material-dashboard.scss (line 59, column 1)
at runLoaders (/var/www/html/Vue/node_modules/webpack/lib/NormalModule.js:286:20)
at /var/www/html/Vue/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /var/www/html/Vue/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/var/www/html/Vue/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at Object.asyncSassJobQueue.push [as callback] (/var/www/html/Vue/node_modules/sass-loader/lib/loader.js:55:13)
at Object.done [as callback] (/var/www/html/Vue/node_modules/neo-async/async.js:7974:18)
at options.error (/var/www/html/Vue/node_modules/node-sass/lib/index.js:294:32)
# ./src/material-dashboard.js 17:0-48
# ./src/main.js
# multi ./src/main.js
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-material-dashboard-pro#1.0.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-material-dashboard-pro#1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-09-03T09_29_01_030Z-debug.log
Additionally, I have tried running npm rebuild node-sass, updated the material-dashboard.css file to include the underscore: _material-dashboard.css, passing --production in npm install --production, but am having no luck.
nodejs version: v8.11.4
npm version: v5.6.0
I've been trying to solve this for a few hours now but am not having any luck. I don't understand why it works locally but not when on another production machine.
This happens because of a spelling mistake (wrong case) in the import statement of this Vue UI library. The file is named "fullcalendar" while the import is called by "fullCalendar" (notice the capital "C"). When you fix this (make the capital "C" simple in the import statement) it will run the "npm run prod" command successfully. It should be noted that, for me, this did not occur in the windows environment for some reason, but only occurs in the Linux environment.
I am writing unit tests in a Vue 2.0 app using PhantomJS, Karma, Mocha and Chai and while the tests pass, I get a warning with each test that looks like this:
ERROR: '[Vue warn]: Failed to resolve directive: highlightjs
(found in <UnitTest>)
I would either like to find a way to ignore warnings about custom directives or somehow make the tests aware of them.
=== Possibly related, possibly separate error ===
When I force one of my tests to fail I am getting an error that looks like:
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "unit"
npm ERR! node v7.6.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! vuestack#1.0.0 unit: `cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vuestack#1.0.0 unit script 'cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vuestack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vuestack
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vuestack
npm ERR! There is likely additional logging output above.
Other tests still pass but this error shows up when they've all run. Have tried uninstalling / reinstalling node modules, as well as switching Node versions around.
Doh! Solved:
import VueHighlightJS from 'vue-highlightjs'
Vue.use(VueHighlightJS);
I found the answer to the question here. Incidentally, a blog post by the creator of the component I was struggling with. Looks like you need to include custom components using Vue.use() in each separate testing file.
My env is Ubuntu 14.04 and I'm using node v0.12.2.. I have installed node via nvm tool..
When Bower is installing, the errors is getting..
npm install -g bower
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
npm ERR! registry error parsing json
I have waited long time to finish installing but it is never finished! I have tried do that many times, I was not able to install Bower..
My npm version is 2.7.4. How can I install bower? There is a different way of installing Bower?