Create new Project fails with 1.8.1
PSchicht opened this issue · 11 comments
Hi,
I'm running your docker image on Windows 10 1809 and Docker 2.0.3
When i try to create a new project, i receive the following error messages:
spfx@1b6041cceef8:/usr/app/spfx$ yo @microsoft/sharepoint
? ==========================================================================
We're constantly looking for ways to make yo better!
May we anonymously report usage statistics to improve the tool over time?
More info: https://github.com/yeoman/insight & http://yeoman.io
========================================================================== No
_-----_
| | .--------------------------.
|--(o)--| | Welcome to the |
---------´ | SharePoint Client-side | ( _´U
_ ) | Solution Generator |
/A\ '--------------------------'
| ~ |
'..'_
´ |° ´ Y
Let's create a new SharePoint solution.
? What is your solution name? spfx-test
? Which baseline packages do you want to target for your component(s)? SharePoint Online only (latest)
? Where do you want to place the files? Use the current folder
Found npm version 6.4.1
? Do you want to allow the tenant admin the choice of being able to deploy the solution to all sites immediately without running any feature deployment or adding apps in sites? No
? Will the components in the solution require permissions to access web APIs that are unique and not shared with other components in the tenant? No
? Which type of client-side component to create? WebPart
Add new Web part to solution spfx-test.
? What is your Web part name? HelloWorld
? What is your Web part description? HelloWorld description
? Which framework would you like to use? React
create package.json
create config/package-solution.json
create config/config.json
create config/serve.json
create tsconfig.json
create .vscode/extensions.json
create .vscode/launch.json
create .vscode/settings.json
create config/copy-assets.json
create config/deploy-azure-storage.json
create config/write-manifests.json
create src/index.ts
create README.md
create .editorconfig
create .gitignore
create gulpfile.js
create tslint.json
create src/webparts/helloWorld/components/IHelloWorldProps.ts
create src/webparts/helloWorld/components/HelloWorld.module.scss
create src/webparts/helloWorld/components/HelloWorld.tsx
create src/webparts/helloWorld/HelloWorldWebPart.ts
create src/webparts/helloWorld/loc/en-us.js
create src/webparts/helloWorld/loc/mystrings.d.ts
create src/webparts/helloWorld/HelloWorldWebPart.manifest.json
create teams/772ee4a5-3d9d-4677-b4dd-a51cc705ea50_outline.png
create teams/772ee4a5-3d9d-4677-b4dd-a51cc705ea50_color.png
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN deprecated core-js@1.2.7: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated es6-collections@0.5.6: not actively maintained anymore
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit https://github.com/lukeed/kleur/releases/tag/v3.0.0\ for migration path(s).
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
deasync@0.1.14 install /usr/app/spfx/node_modules/deasync
node ./build.js
linux-x64-node-8
exists; testing
Binary is fine; exiting
node-sass@4.9.3 install /usr/app/spfx/node_modules/node-sass
node scripts/install.js
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EINVAL: invalid argument, open '/usr/app/spfx/node_modules/node-sass/package.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.Module._extensions..json (module.js:670:20)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/usr/app/spfx/node_modules/node-sass/lib/extensions.js:7:9)
at Module._compile (module.js:653:30)
npm WARN rollback Rolling back cliui@3.2.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/cliui'
npm WARN rollback Rolling back isarray@1.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/are-we-there-yet/node_modules/isarray'
npm WARN rollback Rolling back string-width@1.0.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/gauge/node_modules/string-width'
npm WARN rollback Rolling back camelcase@3.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/camelcase'
npm WARN rollback Rolling back is-fullwidth-code-point@1.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/gauge/node_modules/is-fullwidth-code-point'
npm WARN rollback Rolling back oauth-sign@0.8.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/oauth-sign'
npm WARN rollback Rolling back isarray@1.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/stdout-stream/node_modules/isarray'
npm WARN rollback Rolling back is-fullwidth-code-point@1.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/is-fullwidth-code-point'
npm WARN rollback Rolling back abbrev@1.1.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/abbrev'
npm WARN rollback Rolling back lru-cache@4.1.5 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/lru-cache'
npm WARN rollback Rolling back os-locale@1.4.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/os-locale'
npm WARN rollback Rolling back amdefine@1.0.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/amdefine'
npm WARN rollback Rolling back chalk@1.1.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/chalk'
npm WARN rollback Rolling back string-width@1.0.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/string-width'
npm WARN rollback Rolling back aproba@1.2.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/aproba'
npm WARN rollback Rolling back which-module@1.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/which-module'
npm WARN rollback Rolling back has-unicode@2.0.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/has-unicode'
npm WARN rollback Rolling back console-control-strings@1.1.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/console-control-strings'
npm WARN rollback Rolling back block-stream@0.0.9 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/block-stream'
npm WARN rollback Rolling back lodash.clonedeep@4.5.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/lodash.clonedeep'
npm WARN rollback Rolling back lodash.mergewith@4.6.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/lodash.mergewith'
npm WARN rollback Rolling back npmlog@4.1.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/npmlog'
npm WARN rollback Rolling back wide-align@1.1.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/wide-align'
npm WARN rollback Rolling back punycode@1.4.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/punycode'
npm WARN rollback Rolling back true-case-path@1.0.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/true-case-path'
npm WARN rollback Rolling back yargs@7.1.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/yargs'
npm WARN rollback Rolling back har-validator@5.0.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/har-validator'
npm WARN rollback Rolling back delegates@1.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/delegates'
npm WARN rollback Rolling back async-foreach@0.1.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/async-foreach'
npm WARN rollback Rolling back request@2.87.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/request'
npm WARN rollback Rolling back tough-cookie@2.3.4 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/tough-cookie'
npm WARN rollback Rolling back gaze@1.1.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/gaze'
npm WARN rollback Rolling back in-publish@2.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/in-publish'
npm WARN rollback Rolling back string_decoder@1.1.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/are-we-there-yet/node_modules/string_decoder'
npm WARN rollback Rolling back nan@2.13.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/nan'
npm WARN rollback Rolling back string_decoder@1.1.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/stdout-stream/node_modules/string_decoder'
npm WARN rollback Rolling back yargs-parser@5.0.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/yargs-parser'
npm WARN rollback Rolling back semver@5.3.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-gyp/node_modules/semver'
npm WARN rollback Rolling back nopt@3.0.6 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/nopt'
npm WARN rollback Rolling back fstream@1.0.11 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/fstream'
npm WARN rollback Rolling back globule@1.2.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/globule'
npm WARN rollback Rolling back tar@2.2.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/tar'
npm WARN rollback Rolling back cross-spawn@3.0.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/cross-spawn'
npm WARN rollback Rolling back @microsoft/sp-build-web@1.8.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/@microsoft/sp-build-web'
npm WARN rollback Rolling back source-map@0.4.4 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/scss-tokenizer/node_modules/source-map'
npm WARN rollback Rolling back readable-stream@2.3.6 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/stdout-stream/node_modules/readable-stream'
npm WARN rollback Rolling back readable-stream@2.3.6 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/are-we-there-yet/node_modules/readable-stream'
npm WARN rollback Rolling back node-sass@4.9.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-sass/node_modules/chalk'
npm WARN rollback Rolling back sass-graph@2.2.4 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/sass-graph/node_modules/camelcase'
npm WARN rollback Rolling back @microsoft/gulp-core-build-sass@4.6.2 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/@microsoft/gulp-core-build-sass/node_modules/glob'
npm WARN rollback Rolling back are-we-there-yet@1.1.5 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/are-we-there-yet/node_modules/isarray'
npm WARN rollback Rolling back stdout-stream@1.4.1 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/stdout-stream/node_modules/string_decoder'
npm WARN rollback Rolling back gauge@2.7.4 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/gauge/node_modules/is-fullwidth-code-point'
npm WARN rollback Rolling back node-gyp@3.8.0 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/node-gyp/node_modules/semver'
npm WARN rollback Rolling back scss-tokenizer@0.2.3 failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/usr/app/spfx/node_modules/scss-tokenizer/node_modules/source-map'
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.3 install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.3 install 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! /home/spfx/.npm/_logs/2019-04-26T12_04_02_319Z-debug.log
_=+#####!
###########| .-----------------------------------.
###/ (##|(@) | Congratulations! |
######| \ | Solution spfx-test is created. |
###/ /###| (@) | Run gulp serve to play with it! |
####### ##| / '-----------------------------------'
/##|(@)
###########|
**=+####!
Kind regards
Pascal
This is a known issue with running Docker on Windows and node-sass. We're looking for a solution/workaround but we have nothing to share at this moment unfortunately.
Facing the same problem, wondering if there is solution now. :)
Unfortunately not at the moment. It's an issue with node-sass that hasn't been addressed yet.
Just for reference sake. This is the same issue as: #19 Using yarn helped me on SPFx 1.8.2.
https://github.com/waldekmastykarz/docker-spfx/issues/19#issuecomment-453864414
Is there anything we should do here or is it time to close the issue?
I guess this issue is related to #19, npm/nodejs version, and I guess it will be solved wnen new 1.8.1 image is released.
If we can confirm that it's indeed the same issue, then we can absolutely patch the v1.8.1 image with the correct node version.
when I use waldekm/spfx:1.8.1
image, it fails for me. When I use the following image, it works just fine:
FROM node:8.17.0
EXPOSE 5432 4321 35729
RUN npm i -g gulp@3 yo@2.0.5 @microsoft/generator-sharepoint@1.8.1
VOLUME /usr/app/spfx
WORKDIR /usr/app/spfx
RUN useradd --create-home --shell /bin/bash spfx && \
usermod -aG sudo spfx && \
chown -R spfx:spfx /usr/app/spfx
USER spfx
CMD /bin/bash
Thank you for checking @shurick81! So the solution is to bump Node version to 8.17.0, correct?
yes, and also yo version should be specified, otherwise there is other issue.
I've just updated the image so this issue should be fixed now. Thank you! 👏