Closed engharb closed 6 years ago
Hi engharb,
Any error displayed during yarn install
?
Hi petegore, Yes here is it when I run yarn install
yarn install v0.21.3
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "ELOOP: too many symbolic links encountered, scandir '/home/vagrant/project/node_modules/crypto-browserify/test/vectors'".
info If you think this is a bug, please open a bug report with the information provided in "/home/vagrant/project/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Ok and what's in /home/vagrant/project/yarn-error.log
?
Here is the yarn-error:
Arguments:
/usr/bin/nodejs /usr/bin/yarn install
PATH:
/home/vagrant/.composer/vendor/bin:/home/vagrant/bin:/home/vagrant/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Yarn version:
0.21.3
Node version:
6.10.2
Platform:
linux x64
npm manifest:
{
"devDependencies": {
"@symfony/webpack-encore": "^0.17.0"
},
"license": "UNLICENSED",
"private": true,
"scripts": {
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production"
}
}
yarn manifest:
No manifest
Lockfile:
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
Trace:
Error: ELOOP: too many symbolic links encountered, scandir '/home/vagrant/project/node_modules/crypto-browserify/test/vectors'
at Error (native)
Okay I don't see anything about encore
there. Can you run ls -al node_modules/.bin/
?
And by the way, do you run composer
and yarn
into the same folder ?
here is the result ls: cannot access 'node-modules/': No such file or directory
but the file node-modules exists in the project.
this is the right one ls -al node_modules/
and works.
Yep sorry I meant node_modules/
dir
@petegore there is nothing about encore in the error message. But there is an error during the yarn install
. so if the failure happened before encore itself was installed, this explains what it is bot here.
And even if encore was there, some of its dependencies may also be missing due to the yarn install
failure. So having a working setup involves making yarn install
work.
@stof
I haven't any errors while running composer require encore
.
Can't it be a permissions issue ? Yarn not allowed to create bin files ; or the user unable to execute it ?
@petegore Could you try updating yarn
? the version you're using is quite old (yarn install
doesn't exist anymore and has been replaced by yarn add
)
@engharb composer requiring encore is just about applying a Flex recipe generating the package.json with a encore requirement. this is not installing encore, because Encore is not a PHP package, but a node.js one.
After i run : $ yarn add @symfony/webpack-encore --dev
yarn add v0.21.3
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "babel-loader@7.1.2" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".
warning "babel-loader@7.1.2" has unmet peer dependency "webpack@2 || 3".
warning "extract-text-webpack-plugin@3.0.2" has unmet peer dependency "webpack@^3.1.0".
warning "webpack-dev-server@2.11.1" has unmet peer dependency "webpack@^2.2.0 || ^3.0.0".
warning "webpack-dev-middleware@1.12.2" has unmet peer dependency "webpack@^1.0.0 || ^2.0.0 || ^3.0.0".
warning "uglifyjs-webpack-plugin@0.4.6" has unmet peer dependency "webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0".
error An unexpected error occurred: "ELOOP: too many symbolic links encountered, scandir '/home/vagrant/GeheimnessWebsite/node_modules/crypto-browserify/test/vectors'".
info If you think this is a bug, please open a bug report with the information provided in "/home/vagrant/project/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
it is the same error.
@stof should I try to install it using npm if possible?
@engharb yes, you can try
@engharb You're still using the same outdated version of Yarn there:
yarn add v0.21.3 [1/4] Resolving packages... [2/4] Fetching packages...
Yarn v0.21.3 was released almost a year ago, the current stable version is the 1.3.2.
Try the following:
node_modules
directory and the yarn.lock
file if you have oneyarn add --dev @symfony/webpack-encore
againthank you a lot, I followed the instructions from @Lyrkan and it was succeeded.
regards,
Hi everyone I have the same problem and I want to share with you my solution First, I change my package. Json to this
{ "devDependencies": { "@symfony/webpack-encore/": "^0.22.0", "webpack-notifier": "^1.6.0" }, "license": "UNLICENSED", "private": true, "scripts": { "dev-server": "encore dev-server", "dev": "./node_modules/@symfony/webpack-encore/bin/encore.js dev", "watch": "./node_modules/@symfony/webpack-encore/bin/encore.js dev --watch", "build": "./node_modules/@symfony/webpack-encore/bin/encore.js production --progress" } }
and I run rhis command: yarn run dev
I already have a packge.json file before in my symfony project, I used Gulp to pre-compile my assets, Now I following the encore tutorial in documentation, but not works, So, I check the recipes in symfony, and add following to package.json:
"scripts": {
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
}
and reinstall yarn add --dev @symfony/webpack-encore
, then everything works!
I think the documentation show be notice users that them are already have a package.json
file
Thanks Lyrkan , It works for me in symfony 4.3.
@TangMonk sorry to say, bro, i'm still getting this error.
@devlopersabbir please open a dedicated issue and provide the full information to reproduce that instead of commenting on an issue closed in 2019 (btw, the error you get is not even mentioning the error message used in this issue which was command "encore" not found
so I'm 100% sure that it is a different issue
Hello, I have installed Encore in Symfony3.3 on linux-VM.
when I run
yarn run encore dev
I goterror Command "encore" not found.
I have checked
node_modules/.bin/
and it contains only uuid.Do you have any suggestion?
regards,