npm install doesn't build - symfony

After installing the Symfony Webpack Encore bundle, i execute this command :
npm install
But it doesn't work.
I have this errors :
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "^2.6|^3.2.14" of package "vue#^2.6|^3.2.14": Tags may not have any characters that encodeURIComponent encodes.
Therefore no build is created.
For information
npm-v
8.19.2

Related

Package-lock deployment issue for Firebase Functions

I receive a following error despite no package-lock.json, yarn.lock in my dist directory. I use *.tgz files as artifacts of packages in a monorepo. This function was successfully deployed in the past.
{"#type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":3,"message":"Build failed: npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with npm install before continuing.\nnpm ERR! \nnpm ERR! \nnpm ERR! Invalid: lock file's #mycompany/common#1.0.0 does not satisfy #mycompany/common#file:./mycompany-common-v1.0.0.tgz\nnpm ERR! \n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /www-data-home/.npm/_logs/2022-02-22T10_38_22_819Z-debug.log; Error ID: beaf8772"},"authenticationInfo":{"principalEmail":"myemail#gmail.com"},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction","resourceName":"projects/my-project/locations/us-central1/functions/nestapi"}
The error indicated package.json and package-lock.json are not in sync. Make sure to remove node_modules, execute npm install.
‘npm install’ would install the dependencies, then you'll have a package-json.lock file and CI won't throw any error.
Alternatively, you may also have a look at this GitHub Link.

Error 404 when installing dependencies for firebase functions

I'm trying to intall the following
npm install --save express body-parser firebase functions-helper
but I keep receiving these errors
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/functions-helper - Not found
npm ERR! 404
npm ERR! 404 'functions-helper#latest' is not in the npm 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\admin\AppData\Roaming\npm-cache\_logs\2020-07-13T12_53_21_822Z-debug.log
So far I tried doing this
npm clean cache
upgrade node to latest version but I still get the same errors
It's telling your you are trying to install a package that doesn't exist, I cannot find any package called functions-helper, did you mean firebase-functions-helper
There is no module called "functions-helper". If you are writing Cloud Functions using the Firebase tools, you will need to install the module called "firebase-functions", as described in the documentation.

Connecting Firebase to an React Native App that's using Expo

I am currently trying to connect Firebase to my React Native app that uses Expo. Im currently using this guide: https://docs.expo.io/guides/using-firebase/?fbclid=IwAR0c7g8a-005utr_ROomb_k3ptlAHel3kq004AtFbNkV9iWREeapzR0Dabg and it lead me to the github "Firebase JS SDK". I downloaded the whole github repo (https://github.com/firebase/firebase-js-sdk) and like tried following the instructions on the github such as downloading node, yarn, and java but I am confused on what to do next with the downloaded repo. I have tried running the command "npm install" to try and install the dependencies but I get this error:
npm WARN deprecated tslint#6.1.2: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! Unexpected end of JSON input while parsing near '...cMP/3jKIr36/huSPHVVgD'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ban-Jian\AppData\Roaming\npm-cache\_logs\2020-05-19T23_15_25_175Z-debug.log
And when I run the command: "yarn build" I get this error:
lerna ERR! yarn run build exited 2 in '#firebase/firestore'
lerna ERR! yarn run build stdout:
$ tsc -m es2015 --moduleResolution node scripts/*.ts
error TS6053: File 'scripts/*.ts' not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
error Command failed with exit code 2.
lerna ERR! yarn run build exited 2 in '#firebase/firestore'
lerna WARN complete Waiting for 4 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I guess my question is: How do I properly set up the SDK I downloaded from the github?

npm run build error, no such file or directory, open 'build/bundle.css'

I'm attempting a routine-test of a customized WordPress-installation on a localhost production supported by the node package-manager. After instantiating the WordPress core-files, ensuring successful connection to the database and updating a few assets, I attempted to change-directory into the corresponding WordPress-theme files to run the node-package-manager install command with npm install (which was successful) and then attempted to execute the CSS-compiler with npm run buildas per routine; however, on this attempt, I encountered the following errors within my below terminal output:
vetsi npm run build
> # build /Users/alexsingleton/Sites/vetsi/wp-content/themes/vetsi
> npm-run-all --silent compile:css compile:js
/Users/alexsingleton/Sites/vetsi/wp-content/themes/vetsi/node_modules/stylus/bin/stylus:715
if (err) throw err;
^
Error: ENOENT: no such file or directory, open 'build/bundle.css'
at Error (native)
ERROR: compile:css: None-Zero Exit(1);
npm ERR! Darwin 16.4.0
npm ERR! argv "/Users/alexsingleton/.nvm/versions/node/v4.4.4/bin/node" "/Users/alexsingleton/.nvm/versions/node/v4.4.4/bin/npm" "run" "build"
npm ERR! node v4.4.4
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # build: `npm-run-all --silent compile:css compile:js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # build script 'npm-run-all --silent compile:css compile:js'.
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 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm-run-all --silent compile:css compile:js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/alexsingleton/.npm/_logs/2017-02-15T17_48_20_907Z-debug.log
➜ vetsi
I've tried updating both the node package manager with npm install -g npm and verified the correct version corresponding to another successful localhost production with nvm ls generating the below output:
vetsi nvm ls
v0.12.7
-> v4.4.4
system
default -> 4.4.4 (-> v4.4.4)
node -> stable (-> v4.4.4) (default)
stable -> 4.4 (-> v4.4.4) (default)
iojs -> iojs- (-> N/A) (default)
➜ vetsi
Needless to say, the above-errors preclude any localhost pages from rendering, though I can successfully access and navigate within the WordPress Content Management system. I would appreciate any guidance- thank you!
After investigating the localhost-production within the console of Google Chrome Inspector Tools, the error reported that the entire node package-manager folder and dependencies were missing. Since neither npm-install nor npm build didn't instantiate the package-folder or dependencies, I simply copied the files from my other working localhost production, specifically bundle.css where it was apparently missing from the appropriate path (wp/themes/vetsi/build). For now, this hack is the best solution to my problem but I welcome alternative analysis or clarification as to why the aforementioned commands didn't correctly execute according to my previous successes. Thanks!

"Fatal error: Unable to find local grunt." on Windows 7

I cannot get grunt to work at all on Windows 7. Following the instructions on the Grunt website (http://gruntjs.com/getting-started) I've run:
npm uninstall -g grunt-cli
npm uninstall grunt
npm uninstall -g grunt-init
git clone git#github.com:gruntjs/grunt-init-jquery.git c:/Users/me/.grunt-init/jquery
npm install -g grunt-cli
grunt-init jquery
npm install .
After that, running "grunt" produces the following output:
grunt-cli: The grunt command line interface. (v0.1.9)
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
The output of npm list grunt is:
npm WARN package.json consolidate#0.9.1 No repository field.
npm WARN package.json jquery-plugin#0.0.0-ignored No repository field.
npm WARN package.json passport-local-examples-login#0.0.0 No repository field.
npm WARN package.json receiptly#0.0.1 No repository field.
npm WARN package.json cookie-signature#1.0.1 No repository field.
npm WARN package.json fresh#0.1.0 No repository field.
npm WARN package.json methods#0.0.1 No repository field.
npm WARN package.json range-parser#0.0.4 No repository field.
npm WARN package.json send#0.1.0 No repository field.
npm WARN package.json pause#0.0.1 No repository field.
npm WARN package.json policyfile#0.0.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json eyes#0.1.8 No repository field.
npm WARN package.json bytes#0.2.0 No repository field.
npm WARN package.json dateformat#1.0.2-1.2.3 No repository field.
npm WARN package.json uid2#0.0.2 No repository field.
C:\Users\me\AppData\Roaming\npm
└─┬ grunt-init#0.2.1
└── grunt#0.4.1
Running "npm install grunt" in the current directory gives the same error when running grunt.
Any thoughts? My understanding is that grunt-cli is meant to look for a local grunt install, but I can't work out why it can't find it.
I know its been 2 years since this question was asked. However if someone wants in future:
I got the exact same issue. And I got this fixed by installing grunt locally. As per grunt site,
Note that installing grunt-cli does not install the Grunt task runner!
The job of the Grunt CLI is simple: run the version of Grunt which has
been installed next to a Gruntfile. This allows multiple versions of
Grunt to be installed on the same machine simultaneously.
So I just got it working by installing Grunt locally.
npm install grunt --save-dev
--save : adds it to your package.json.
-dev: adds it as a dev dependency.
There must be a Gruntfile.js located in the directory you run the command from. Also double check that 'npm install grunt' actually gave you a node_modules directory with a sub directory called grunt.
You should install grunt in GUI mode.
Open node.js cmd prompt then open the root folder and run the below commands
npm install ( once it done you can able to see node_modules folder in the root folder)
npm install –g grunt-cli (change the version from ("version": "minified" to Current release("version":"1.11"); you should replace with minified once you run build)
grunt build:full
Note: Version has to change when running grunt very first time.
if the above answer do not works then you can try by using this
rm -rf node_modules/ && npm cache clean && npm install

Resources