Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resulting path names are too long #12

Closed
aburgm opened this issue Jun 15, 2017 · 8 comments · Fixed by #19
Closed

Resulting path names are too long #12

aburgm opened this issue Jun 15, 2017 · 8 comments · Fixed by #19

Comments

@aburgm
Copy link

aburgm commented Jun 15, 2017

I failed to install nodejs on Windows 7 with conda because the resulting path names are too long. While this is ultimately a problem that could be fixed in conda or Python (and seems to be in Python 3.6 on Windows 10), I wonder if there is anything we could do in the nodejs recipe to obtain a flatter directory structure?

DEBUG conda.core.package_cache:_execute_action(505): Traceback (most recent call last):
  File "C:\Users\aburgmeier\AppData\Local\Miniconda3\lib\site-packages\conda\core\package_cache.py", line 502, in _execute_action
    action.execute()
  File "C:\Users\aburgmeier\AppData\Local\Miniconda3\lib\site-packages\conda\core\path_actions.py", line 807, in execute
    extract_tarball(self.source_full_path, self.target_full_path)
  File "C:\Users\aburgmeier\AppData\Local\Miniconda3\lib\site-packages\conda\gateways\disk\create.py", line 108, in extract_tarball
    t.extractall(path=destination_directory)
  File "C:\Users\aburgmeier\AppData\Local\Miniconda3\lib\tarfile.py", line 1996, in extractall
    numeric_owner=numeric_owner)
  File "C:\Users\aburgmeier\AppData\Local\Miniconda3\lib\tarfile.py", line 2038, in extract
    numeric_owner=numeric_owner)
  File "C:\Users\aburgmeier\AppData\Local\Miniconda3\lib\tarfile.py", line 2108, in _extract_member
    self.makefile(tarinfo, targetpath)
  File "C:\Users\aburgmeier\AppData\Local\Miniconda3\lib\tarfile.py", line 2148, in makefile
    with bltn_open(targetpath, "wb") as target:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\aburgmeier\\AppData\\Local\\Miniconda3\\pkgs\\nodejs-6.11.0-0\\node_modules\\npm\\node_modules\\update-notifier\\node_modules\\latest-version\\node_modules\\package-json\\node_modules\\got\\node_modules\\create-error-class\\node_modules\\capture-stack-trace\\package.json'
@minrk
Copy link
Member

minrk commented Nov 24, 2017

This should be fixed (or at least slightly less likely to occur) with the lates nodejs 8 package.

@minrk minrk closed this as completed Nov 24, 2017
@rsignell-usgs
Copy link

I just tried to install on Windows and got:

(widgets) C:\Users\rsignell\Documents\GitHub>conda install nodejs
Fetching package metadata ...............
Solving package specifications: .

Package plan for installation in environment C:\Users\rsignell\AppData\Local\Continuum\Miniconda3\envs\widgets:

The following NEW packages will be INSTALLED:

    nodejs: 6.12.0-0 conda-forge

Proceed ([y]/n)? y


CondaError: FileNotFoundError(2, 'The filename or extension is too long')
CondaError: FileNotFoundError(2, 'The filename or extension is too long')
CondaError: FileNotFoundError(2, 'The filename or extension is too long')

@ocefpaf
Copy link
Member

ocefpaf commented Dec 15, 2017

Latest version should be 8.8.1 but I guess those did not build, see

https://ci.appveyor.com/project/conda-forge/nodejs-feedstock

The odd thing is that they seems to pass on the PR. Here is the error on master:

Nope, that is the PR, sorry.

[00:42:22] INFO:conda_build.build:Packaging nodejs-8.8.1-0
[00:42:32] compiling .pyc files...
[00:42:34] number of files: 4933
[00:42:34] Fixing permissions
[00:42:35] Fixing permissions
[00:42:41] Detected hard-coded path in text file node_modules/npm/package.json
[00:42:51] C:\bld\win-32\nodejs-8.8.1-0.tar.bz2
[00:42:55] Traceback (most recent call last):
[00:42:55]   File "C:\Miniconda\Scripts\conda-build-script.py", line 5, in <module>
[00:42:55]     sys.exit(conda_build.cli.main_build.main())
[00:42:55]   File "C:\Miniconda\lib\site-packages\conda_build\cli\main_build.py", line 342, in main
[00:42:55]     execute(sys.argv[1:])
[00:42:55]   File "C:\Miniconda\lib\site-packages\conda_build\cli\main_build.py", line 333, in execute
[00:42:55]     noverify=args.no_verify)
[00:42:55]   File "C:\Miniconda\lib\site-packages\conda_build\api.py", line 97, in build
[00:42:55]     need_source_download=need_source_download, config=config)
[00:42:55]   File "C:\Miniconda\lib\site-packages\conda_build\build.py", line 1530, in build_tree
[00:42:55]     test(pkg, config=config)
[00:42:55]   File "C:\Miniconda\lib\site-packages\conda_build\build.py", line 1253, in test
[00:42:55]     recipe_dir, need_cleanup = utils.get_recipe_abspath(recipedir_or_package_or_metadata)
[00:42:55]   File "C:\Miniconda\lib\site-packages\conda_build\utils.py", line 82, in get_recipe_abspath
[00:42:55]     t.extractall(path=recipe_dir)
[00:42:55]   File "C:\Miniconda\lib\tarfile.py", line 2081, in extractall
[00:42:55]     self.extract(tarinfo, path)
[00:42:55]   File "C:\Miniconda\lib\tarfile.py", line 2118, in extract
[00:42:55]     self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
[00:42:55]   File "C:\Miniconda\lib\tarfile.py", line 2186, in _extract_member
[00:42:55]     os.makedirs(upperdirs)
[00:42:55]   File "C:\Miniconda\lib\os.py", line 157, in makedirs
[00:42:55]     mkdir(name, mode)
[00:42:55] WindowsError: [Error 206] The filename or extension is too long: 'c:\\users\\appveyor\\appdata\\local\\temp\\1\\tmp4nf6uy\\node_modules\\npm\\node_modules\\libnpx\\node_modules\\yargs\\node_modules\\read-pkg-up\\node_modules\\read-pkg\\node_modules\\load-json-file\\node_modules\\parse-json\\node_modules\\error-ex\\node_modules\\is-arrayish'
[00:42:55] Command exited with code 1

@minrk minrk reopened this Jan 2, 2018
@minrk minrk mentioned this issue Jan 2, 2018
@minrk minrk closed this as completed in #19 Jan 2, 2018
@SanjayRathod033
Copy link

I just tried to install node js and got below error.

(C:\Users\sarathod\AppData\Local\Continuum\anaconda3) C:\Users\sarathod>conda install -c conda-forge nodejs
Fetching package metadata ...............
Solving package specifications: .

Package plan for installation in environment C:\Users\sarathod\AppData\Local\Continuum\anaconda3:

The following NEW packages will be INSTALLED:

nodejs: 9.9.0-0 conda-forge

Proceed ([y]/n)? y
CondaError: FileNotFoundError(2, 'The filename or extension is too long')
CondaError: FileNotFoundError(2, 'The filename or extension is too long')
CondaError: FileNotFoundError(2, 'The filename or extension is too long')

@drafter250
Copy link

Same issue here with 9.9.0 on conda-forge

however the 8.9.3-hd6b2f15_0 version on the default anaconda channel seemed to install correctly.

@jakirkham
Copy link
Member

Could those of you running into this problem please supply more information in issue ( conda/conda#7203 )? As it is, there is not enough information to solve the issue.

@guillaumedavidphd
Copy link

See #29 for more info

@jakirkham
Copy link
Member

This is ultimately a conda problem that has been filed as issue ( conda/conda#7203 ). Please follow along and share info there. FWIW there is a suggested workaround for this issue. Going to close to consolidate the discussion in that issue. Thanks all for reporting and sharing details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants