const web3 = require("#solana/web3.js");
I'm trying to run #solana/web3.js from a fork so I need to install it using
npm i https://github.com/redazul/solana-web3.js.git
the fork is being done to add console.logs for educational purposes
I also tried to build the solana-web3.js source repo
but npm run build does not work
$ npm run build
> #solana/web3.js#0.0.0-development build
> npm run clean; cross-env NODE_ENV=production rollup -c; npm run type:gen
npm ERR! Missing script: "clean;"
npm ERR!
npm ERR! Did you mean this?
npm ERR! npm run clean # run the "clean" package script
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
The problem was related to target / build environment
The following worked using WSL + Ubuntu 20.04
npm i
npm run build
Then commit to github
Related
Goal
Avoid error message.
I have been getting the following error message when I run the command npm run dev:
npm notice
npm notice New major version of npm available! 7.6.1 -> 8.1.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.4
npm notice Run npm install -g npm#8.1.4 to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: acorn#7.4.1
npm ERR! node_modules/acorn
npm ERR! acorn#"^7.0.0" from acorn-node#1.8.2
npm ERR! node_modules/acorn-node
npm ERR! acorn-node#"^1.6.1" from detective#5.2.0
npm ERR! node_modules/detective
npm ERR! detective#"^5.2.0" from tailwindcss#2.2.19
npm ERR! node_modules/tailwindcss
npm ERR! dev tailwindcss#"^2.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional acorn#"^8.5.0" from terser#5.10.0
npm ERR! node_modules/terser
npm ERR! terser#"^5.9.0" from laravel-mix#6.0.39
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix#"^6.0.6" from the root project
npm ERR! terser#"^5.7.2" from terser-webpack-plugin#5.2.5
npm ERR! node_modules/terser-webpack-plugin
npm ERR! terser-webpack-plugin#"^5.2.4" from laravel-mix#6.0.39
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix#"^6.0.6" from the root project
npm ERR! 1 more (webpack)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/ml/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ml/.npm/_logs/2021-12-02T07_41_55_149Z-debug.log
Quick Solution:
I can avoid the problem / error message with the following command:
npm install --legacy-peer-deps.
Output:
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
added 807 packages, and audited 808 packages in 12s
84 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Question
What do I have to do to run npm install again without getting the error message?
I have the same issue too. I have fixed it using this line
npm i acorn --dev
then run again
npm install && install run dev
npm install npm#latest -g
then
npm install webpack-dev-server --save-dev
working for me
If you are using Laravel Homestead Package for any Vagrant Environment, then don't run the command inside the Vagrant Project Directory.
Go outside to the local directory of the project and run these commands.
image of commands inside vagrant
You should run these here::
image of commands outside vagrant
I am very unfamiliar with the deployment process and how to interpret the build log on Heroku. I'm trying to deploy my Phoenix Elixir app and have gone through the process as outlined on https://hexdocs.pm/phoenix/heroku.html. However, I am get the following error in my build logs:
npm ERR! Linux 4.4.0-1062-aws
npm ERR! argv "/tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/.heroku/node/bin/node" "/tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/.heroku/node/bin/npm" "run" "deploy"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! # deploy: `webpack --mode production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # deploy script 'webpack --mode production'.
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! webpack --mode production
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! /tmp/build_cb2fdf13a1883f06eae3f7c5297f7b64/assets/npm-debug.log
I've updated to the latest version of node.js and npm as the logs suggested.
Thanks!
The issue isn't with the version of node that you have locally. If you look at the logs it shows that heroku is trying to use node v6.9.2. That is a really old version of node that won't work. You need to use heroku-buildpack-phoenix-static so that you can define the node version the heroku is trying to use. Add the buildpack with the cli:
$ heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git
Then create a file phoenix_static_buildpack.config in your project root directory. In that file define the version of node to use:
node_version=12.18.1
This will tell heroku to use that version of node. After that try to redeploy and the issue should be resolved.
If you have more issues then check out the phoenix docs on deploying to heroku. It has a lot of useful information:
https://hexdocs.pm/phoenix/heroku.html
when I have created the new project for Laravel 5.5 + Vue.js 2.x , I have the problem. This is the message after I have run this.
npm install
npm run dev
> # dev /Volumes/Work/Work/Vue/CRUD
> npm run development
> # development /Volumes/Work/Work/Vue/CRUD
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
95% emitting
DONE Compiled successfully in 2830ms 6:01:15 PM
internal/child_process.js:325
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at _errnoException (util.js:1041:11)
at ChildProcess.spawn (internal/child_process.js:325:11)
at exports.spawn (child_process.js:493:9)
at Object.exports.execFile (child_process.js:208:15)
at Object.module.exports.fileCommand (/Volumes/Work/Work/Vue/CRUD/node_modules/node-notifier/lib/utils.js:53:13)
at NotificationCenter.notify (/Volumes/Work/Work/Vue/CRUD/node_modules/node-notifier/notifiers/notificationcenter.js:66:11)
at module.exports.WebpackNotifierPlugin.compilationDone (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack-notifier/index.js:62:18)
at Compiler.applyPlugins (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:61:14)
at emitRecords.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:268:11)
at Compiler.emitRecords (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:368:12)
at next (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/Volumes/Work/Work/Vue/CRUD/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:365:9)
at require.forEach.err (/Volumes/Work/Work/Vue/CRUD/node_modules/webpack/lib/Compiler.js:354:15)
at /Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:421:16
at iteratorCallback (/Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:998:13)
at /Volumes/Work/Work/Vue/CRUD/node_modules/async/dist/async.js:906:16
at /Volumes/Work/Work/Vue/CRUD/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # development 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! /Users/paladin2/.npm/_logs/2017-09-04T08_01_15_242Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # dev 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! /Users/paladin2/.npm/_logs/2017-09-04T08_01_15_321Z-debug.log
Has anybody had the same problem in the past?
giving your user execute rights on node_modules does the trick: chmod -R u+x node_modules/
if npm update doesn't work try installing webpack manually by command.
npm install –save-dev npm-install-webpack-plugin
I had the same issue since this morning and I remembered that I updated my npm version lately.
EVen if I created a new project and ran
npm install && npm run dev
I got the same issue.
A temporary solution for me is/was to downgrade npm:
npm install -g npm#5.3
If I now run npm run dev everything works fine.
that issue cause of permission of that folder, I think.
when I set folder permission like this, all works fine on my computer.
chmod -R 765 [foldername]
Thanks.
I've installed without laragon or Virtual host. Got the same error that cross-env is not found.
After the hours of research I found the solution. Here is how I did:
npm install cross-env -g
npm update
npm install --save
after that npm run dev or npm run build
Boom! Laravel Mix Build Successful it is working.....
I followed the instructions on angular.io to setup and run an angular-quickstart (Angular 2) project on Mac OS X 10.12. Unfortunately I get the following error:
% npm start
> angular-quickstart#1.0.0 prestart /Users/will/Documents/Projects/test/angular2-test
> npm run build
> angular-quickstart#1.0.0 build /Users/will/Documents/Projects/test/angular2-test
> tsc -p src/
> angular-quickstart#1.0.0 start /Users/will/Documents/Projects/test/angular2-test
> concurrently "npm run build:watch" "npm run serve"
[0] Unknown option: `-l'
[0] Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
[1] Unknown option: `-l'
[1] Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
[0] npm run build:watch exited with code 1
[1] npm run serve exited with code 1
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/6.2.2/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.2.2
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart#1.0.0 start: `concurrently "npm run build:watch" "npm run serve"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart#1.0.0 start script 'concurrently "npm run build:watch" "npm run serve"'.
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 angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concurrently "npm run build:watch" "npm run serve"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/will/Documents/Projects/test/angular2-test/npm-debug.log
I read all posts about angular-quickstart and mac unfortunately without finding anything that would help. I did upgrade nodejs and npm and also manually installed "concurrently" although this was probably not the problem. I can start both commands (npm run build:watch and npm run serve) separately and things seem to work ok (code gets automatically compiled on changes and the browser gets updated). So does anyone have an idea what might be the problem here?
Thanks!
I'm building an image from a Dockerfile and the part where I npm install the dependencies is erroring when I build the image, but I can run the commands outside of it. I don't know exactly where this error is coming from.
I'm using boot2docker on Windows and my Dockerfile is:
FROM ubuntu:15.04
RUN apt-get -y update
RUN apt-get -y install nodejs
RUN apt-get -y install npm
COPY /server /src
COPY /server/package.json /tmp/package.json
RUN cd /tmp && npm install
(etc)
The error message is:
sh:1 node: not found
npm WARN: This failure might be due to the use of legacy binary "node"
npm WARN: For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! sails#0.11.0 preinstall: 'node ./lib/preinstall_npmcheck.js'
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the sails#0.11.0 preinstall script.
npm ERR! This is most likely a problem iwth the sails package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/preinstall_npmcheck.js
npm ERR! You can get their info via:
npm ERR! npm owner ls sails
npm ERR! There is additional logging output above.
npm ERR! System Linux 4.0.3-boot2docker
npm ERR! command "usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npm-debug.log
npm ERR! not ok code 0
INFO[0633] THe command [/bin/sh -c cd /tmp && install] returned a non-zero code: 1
Although it says it's probably a problem with Sails, I have no problem installing it on my machine. I can't install it when I run the image (obviously), and when I try to just run the ubuntu:15.04 image and install npm and Sails there, it tells me that npm is a command not found.
I'm still new to Docker (and to Windows-- I can't even find the npm-debug.log) so any type of advice helps a lot.
Thank you!
It's a problem of nodejs installation which was covered here: what are the differences between node.js and node?
Breifly, there are three options to fix this: creating symlink yourself, using nvm, or installing nodejs-legacy instead of nodejs:
RUN apt-get -y install nodejs-legacy