-
Notifications
You must be signed in to change notification settings - Fork 1k
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
NPM issue installing @microsoft/generator-sharepoint #992
Comments
Have you tried installing the generator again to verify this wasn't a one-time issue? |
Hi Waldek, I have tried installing @microsoft/generator-sharepoint multiple times on my system but I got the same error. So I took "node_modules" including @microsoft folder from my colleague's system and copied the same to my project "HelloWorld" local folder and it started working. |
I have reopened this ticket, as above solution is just a work-around. I need to know why @microsoft/generator-sharepoint module is not getting installed on my system and how do I check the same? |
Have you tried running the command prompt as admin? |
Yes ..I'm running the command prompt as admin. Another observation, after copying node_module to local folder of my sharepoint web part project. I'm able to do "gulp serve" and it opens the SharePoint workbench. But if I move the same node module contents to "C:\Users\user-name\AppData\Roaming\npm" then runs gulp server, it says Why its looking for local gulp when its there in global path? |
That's specific to gulp and how it works: it always requires to be installed both globally and locally. |
On another note: you should not move your local node_modules folder to the location where globally installed packages are. The only package you have to have installed globally is (at)microsoft/generator-sharepoint. In your project however, you have installed all dependencies required for your project to run. |
But @microsoft/sp-build-web is already there in global folder. This means, for some reason it always looking for all the modules in local folder only. What could be the issue? |
are you still having the node_modules folder from your project in |
Hey Waldek, Just stumbled upon this post. Apparently I am also facing the same issue. There is a small difference, I am getting this when I create SPFx project (yo @ microsoft/sharepoint). The strange thing is, out of 10 attempts, it works at times.
These did not help either. Any idea what might be stopping this from creating the project. Help is appreciated |
@arjunumenon what error are you getting exactly? |
Hey @waldekmastykarz , And towards the end of execution, following are the errors which are there at the bottom. npm ERR! Windows_NT 10.0.10586 npm ERR! enoent ENOENT: no such file or directory, lstat 'D:\blah\SpFx\SampleWP\RnD\node_modules.staging\node-forge-dc10c1f7\flash\swf\SocketPool.swf' Let me know if you need any more information on the same please. |
#1115 I Have created another issue in Git. We can converse in that if you are fine with that. |
Hi all, Normally this issue is some sort of permissions error with NPM, you can find a number of similar issue on GitHub: npm/npm#5133 Alternately, we have experienced a similar issue internally as well (as well as other NPM users). Specifically, this is a race condition in the request library that occurs:
We have opened an issue with the project maintainer, but there has been very little activity on that project (they have not merged our PR with a workaround). Unfortunately the only workaround is... not using NPM, but instead using a different package manager. We have been working on migrating to PNPM (a far, far superior package manager) internally, but have not completed this migration. The owner of that project has already mitigated this issue. We are hoping to advise our customers to use pnpm in the future, but right now some of our libraries don't fully support it. |
Closing this issue as #1115 was fixed. |
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues |
Hi,
While installing @microsoft/generator-sharepoint using npm I'm getting following error:
C:\>Npm install -g @microsoft/generator-sharepoint
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: connect 2.x series is deprecated
npm WARN deprecated [email protected]: not actively maintained anymore
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm ERR! tar.unpack untar error C:\Users\useraccount\AppData\Roaming\npm-cache\node-forge\0.7.1\package.tgz
C:\Users\useraccount\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules@microsoft\generator-sharepoint\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of ajv@>=5.0.0 but none was installed.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\useraccount\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "@microsoft/generator-sharepoint"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! path C:\Users\useraccount\AppData\Roaming\npm\node_modules.staging\node-forge-29ac5de4\flash\swf\SocketPool.swf
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall lstat
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\useraccount\AppData\Roaming\npm\node_modules.staging\node-forge-29ac5de4\flash\swf\SocketPool.swf'
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\useraccount\AppData\Roaming\npm\node_modules.staging\node-forge-29ac5de4\flash\swf\SocketPool.swf'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\npm-debug.log
npm ERR! code 1
Here are my node & NPM version details
Please let me know what could be the issue here
Thanks,
Sanju
The text was updated successfully, but these errors were encountered: